[libpeas] Be more strict in peas_object_module_register_extension_type()
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Be more strict in peas_object_module_register_extension_type()
- Date: Wed, 16 Dec 2015 01:05:32 +0000 (UTC)
commit f6dac8247dad2a8f684c9598cf1a454fba7ee902
Author: Garrett Regier <garrettregier gmail com>
Date: Fri Nov 20 02:44:09 2015 -0800
Be more strict in peas_object_module_register_extension_type()
Before it was possible to specify that the iface_type
was that of PeasPluginLoader and bypass the check
that the extensin type is of the iface_type.
libpeas/peas-object-module.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/libpeas/peas-object-module.c b/libpeas/peas-object-module.c
index fb6f975..68cb43a 100644
--- a/libpeas/peas-object-module.c
+++ b/libpeas/peas-object-module.c
@@ -564,12 +564,10 @@ peas_object_module_register_extension_type (PeasObjectModule *module,
{
g_return_if_fail (PEAS_IS_OBJECT_MODULE (module));
g_return_if_fail (!peas_object_module_provides_object (module, iface_type));
+ g_return_if_fail (g_type_is_a (extension_type, iface_type));
if (iface_type != PEAS_TYPE_PLUGIN_LOADER)
- {
- g_return_if_fail (G_TYPE_IS_INTERFACE (iface_type));
- g_return_if_fail (g_type_is_a (extension_type, iface_type));
- }
+ g_return_if_fail (G_TYPE_IS_INTERFACE (iface_type));
peas_object_module_register_extension_factory (module,
iface_type,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]