diff options
20 files changed, 14 insertions, 1172 deletions
diff --git a/configure.ac b/configure.ac index 23b17d1..2c9112f 100644 --- a/configure.ac +++ b/configure.ac @@ -383,15 +383,6 @@ GNOME_COMPILE_WARNINGS([maximum]) # Use --enable-maintainer-mode to disabled deprecated symbols GNOME_MAINTAINER_MODE_DEFINES -AC_ARG_ENABLE([deprecation], - AS_HELP_STRING([--disable-deprecation],[Disable deprecated libpeas features]), - [enable_deprecation=$enableval], - [enable_deprecation=$USE_MAINTAINER_MODE]) -if test "$enable_deprecation" = "yes"; then - AC_MSG_NOTICE([disabling deprecated libpeas features]) - AC_DEFINE([PEAS_DISABLE_DEPRECATED_FEATURES],[1],[Disable deprecated features]) -fi - AC_CONFIG_FILES([ Makefile diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am index bb5791b..63eb00a 100644 --- a/docs/reference/Makefile.am +++ b/docs/reference/Makefile.am @@ -48,8 +48,6 @@ IGNORE_HFILES= \ peas-debug.h \ peas-dirs.h \ peas-engine-priv.h \ - peas-extension-wrapper.h \ - peas-extension-subclasses.h \ peas-gtk-disable-plugins-dialog.h \ peas-gtk-plugin-manager-store.h \ peas-helpers.h \ diff --git a/libpeas/Makefile.am b/libpeas/Makefile.am index ccf5b21..b9b9780 100644 --- a/libpeas/Makefile.am +++ b/libpeas/Makefile.am @@ -37,8 +37,6 @@ NOINST_H_FILES = \ peas-debug.h \ peas-dirs.h \ peas-engine-priv.h \ - peas-extension-wrapper.h \ - peas-extension-subclasses.h \ peas-helpers.h \ peas-i18n.h \ peas-introspection.h \ @@ -54,8 +52,6 @@ C_FILES = \ peas-extension.c \ peas-extension-base.c \ peas-extension-set.c \ - peas-extension-wrapper.c \ - peas-extension-subclasses.c \ peas-helpers.c \ peas-i18n.c \ peas-introspection.c \ diff --git a/libpeas/peas-extension-subclasses.c b/libpeas/peas-extension-subclasses.c deleted file mode 100644 index 50e391e..0000000 --- a/libpeas/peas-extension-subclasses.c +++ /dev/null @@ -1,394 +0,0 @@ -/* - * peas-extension-subclasses.c - * This file is part of libpeas - * - * Copyright (C) 2010 - Steve Frécinaux - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <string.h> -#include <girepository.h> -#include <girffi.h> -#include "peas-extension-wrapper.h" -#include "peas-extension-subclasses.h" -#include "peas-introspection.h" - -typedef struct _MethodImpl { - GType interface_type; - GIFunctionInfo *invoker_info; - const gchar *method_name; - ffi_cif cif; - ffi_closure *closure; - guint struct_offset; -} MethodImpl; - -static GQuark -method_impl_quark (void) -{ - static GQuark quark = 0; - - if (quark == 0) - quark = g_quark_from_static_string ("PeasExtensionInterfaceImplementation"); - - return quark; -} - -static void -handle_method_impl (ffi_cif *cif, - gpointer result, - gpointer *args, - gpointer data) -{ - MethodImpl *impl = (MethodImpl *) data; - GIArgInfo arg_info; - GITypeInfo type_info; - GITypeInfo return_type_info; - gint n_args, i; - PeasExtensionWrapper *instance; - GIArgument *arguments; - GIArgument return_value; - gboolean success; - - instance = *((PeasExtensionWrapper **) args[0]); - g_assert (PEAS_IS_EXTENSION_WRAPPER (instance)); - - n_args = g_callable_info_get_n_args (impl->invoker_info); - g_return_if_fail (n_args >= 0); - arguments = g_newa (GIArgument, n_args); - - for (i = 0; i < n_args; i++) - { - g_callable_info_load_arg (impl->invoker_info, i, &arg_info); - g_arg_info_load_type (&arg_info, &type_info); - - if (g_arg_info_get_direction (&arg_info) == GI_DIRECTION_IN) - peas_gi_pointer_to_argument (&type_info, args[i + 1], &arguments[i]); - else - arguments[i].v_pointer = *((gpointer **) args[i + 1]); - } - - success = peas_extension_wrapper_callv (instance, impl->interface_type, - impl->invoker_info, impl->method_name, - arguments, &return_value); - - if (!success) - memset (&return_value, 0, sizeof (GIArgument)); - - g_callable_info_load_return_type (impl->invoker_info, &return_type_info); - if (g_type_info_get_tag (&return_type_info) != GI_TYPE_TAG_VOID) - peas_gi_argument_to_pointer (&return_type_info, &return_value, result); -} - -static void -create_native_closure (GType interface_type, - GIInterfaceInfo *iface_info, - GIVFuncInfo *vfunc_info, - MethodImpl *impl) -{ - GIFunctionInfo *invoker_info; - GIStructInfo *struct_info; - GIFieldInfo *field_info; - GITypeInfo *type_info; - GICallbackInfo *callback_info; - guint n_fields, i; - gboolean found_field_info; - - invoker_info = g_vfunc_info_get_invoker (vfunc_info); - if (invoker_info == NULL) - { - g_debug ("No invoker for VFunc '%s.%s'", - g_base_info_get_name (iface_info), - g_base_info_get_name (vfunc_info)); - return; - } - - struct_info = g_interface_info_get_iface_struct (iface_info); - n_fields = g_struct_info_get_n_fields (struct_info); - - found_field_info = FALSE; - for (i = 0; i < n_fields; i++) - { - field_info = g_struct_info_get_field (struct_info, i); - - if (strcmp (g_base_info_get_name (field_info), - g_base_info_get_name (vfunc_info)) == 0) - { - found_field_info = TRUE; - break; - } - - g_base_info_unref (field_info); - } - - if (!found_field_info) - { - g_debug ("No struct field for VFunc '%s.%s'", - g_base_info_get_name (iface_info), - g_base_info_get_name (vfunc_info)); - g_base_info_unref (struct_info); - g_base_info_unref (invoker_info); - return; - } - - type_info = g_field_info_get_type (field_info); - g_assert (g_type_info_get_tag (type_info) == GI_TYPE_TAG_INTERFACE); - - callback_info = g_type_info_get_interface (type_info); - g_assert (g_base_info_get_type (callback_info) == GI_INFO_TYPE_CALLBACK); - - impl->interface_type = interface_type; - impl->invoker_info = invoker_info; - impl->method_name = g_base_info_get_name (invoker_info); - impl->closure = g_callable_info_prepare_closure (callback_info, &impl->cif, - handle_method_impl, impl); - impl->struct_offset = g_field_info_get_offset (field_info); - - g_base_info_unref (callback_info); - g_base_info_unref (type_info); - g_base_info_unref (field_info); - g_base_info_unref (struct_info); -} - -static void -implement_interface_methods (gpointer iface, - GType proxy_type) -{ - GType exten_type = G_TYPE_FROM_INTERFACE (iface); - guint i; - GArray *impls; - - g_debug ("Implementing interface '%s' for proxy type '%s'", - g_type_name (exten_type), g_type_name (proxy_type)); - - impls = g_type_get_qdata (exten_type, method_impl_quark ()); - - if (impls == NULL) - { - GIInterfaceInfo *iface_info; - guint n_vfuncs; - - iface_info = g_irepository_find_by_gtype (NULL, exten_type); - g_return_if_fail (iface_info != NULL); - g_return_if_fail (g_base_info_get_type (iface_info) == GI_INFO_TYPE_INTERFACE); - - n_vfuncs = g_interface_info_get_n_vfuncs (iface_info); - - impls = g_array_new (FALSE, TRUE, sizeof (MethodImpl)); - g_array_set_size (impls, n_vfuncs); - - for (i = 0; i < n_vfuncs; i++) - { - GIVFuncInfo *vfunc_info; - - vfunc_info = g_interface_info_get_vfunc (iface_info, i); - create_native_closure (exten_type, iface_info, - vfunc_info, - &g_array_index (impls, MethodImpl, i)); - - g_base_info_unref (vfunc_info); - } - - g_type_set_qdata (exten_type, method_impl_quark (), impls); - g_base_info_unref (iface_info); - } - - for (i = 0; i < impls->len; i++) - { - MethodImpl *impl = &g_array_index (impls, MethodImpl, i); - gpointer *method_ptr; - - if (impl->closure == NULL) - continue; - - method_ptr = G_STRUCT_MEMBER_P (iface, impl->struct_offset); - *method_ptr = impl->closure; - - g_debug ("Implemented '%s.%s' at %d (%p) with %p", - g_type_name (exten_type), impl->method_name, - impl->struct_offset, method_ptr, impl->closure); - } - - g_debug ("Implemented interface '%s' for '%s' proxy", - g_type_name (exten_type), g_type_name (proxy_type)); -} - -static gpointer -get_parent_class (GObject *object) -{ - return g_type_class_peek (g_type_parent (G_TYPE_FROM_INSTANCE (object))); -} - -static void -extension_subclass_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - PeasExtensionWrapper *exten = PEAS_EXTENSION_WRAPPER (object); - - /* This will have already been set on the real instance */ - if ((pspec->flags & G_PARAM_CONSTRUCT_ONLY) != 0) - return; - - /* Setting will fail if we are not constructed yet */ - if ((pspec->flags & G_PARAM_CONSTRUCT) != 0 && !exten->constructed) - return; - - g_debug ("Setting '%s:%s'", - G_OBJECT_TYPE_NAME (object), - g_param_spec_get_name (pspec)); - - G_OBJECT_CLASS (get_parent_class (object))->set_property (object, prop_id, - value, pspec); -} - -static void -extension_subclass_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ - g_debug ("Getting '%s:%s'", - G_OBJECT_TYPE_NAME (object), - g_param_spec_get_name (pspec)); - - G_OBJECT_CLASS (get_parent_class (object))->get_property (object, prop_id, - value, pspec); -} - -static void -extension_subclass_init (GObjectClass *klass, - GType *exten_types) -{ - guint i; - guint property_id = 1; - - g_debug ("Initializing class '%s'", G_OBJECT_CLASS_NAME (klass)); - - klass->set_property = extension_subclass_set_property; - klass->get_property = extension_subclass_get_property; - - for (i = 0; exten_types[i] != 0; ++i) - { - guint n_props, j; - gpointer iface_vtable; - GParamSpec **properties; - - iface_vtable = g_type_default_interface_peek (exten_types[i]); - properties = g_object_interface_list_properties (iface_vtable, &n_props); - - for (j = 0; j < n_props; ++j, ++property_id) - { - const gchar *property_name; - - property_name = g_param_spec_get_name (properties[j]); - - g_object_class_override_property (klass, property_id, property_name); - - g_debug ("Overrided '%s:%s' for '%s' proxy", - g_type_name (exten_types[i]), property_name, - G_OBJECT_CLASS_NAME (klass)); - } - - g_free (properties); - } - - g_debug ("Initialized class '%s'", G_OBJECT_CLASS_NAME (klass)); -} - -static void -extension_subclass_instance_init (GObject *instance) -{ - g_debug ("Initializing new instance of '%s'", G_OBJECT_TYPE_NAME (instance)); -} - -GType -peas_extension_register_subclass (GType parent_type, - GType *extension_types) -{ - guint i; - GString *type_name; - GType the_type; - - type_name = g_string_new (g_type_name (parent_type)); - - for (i = 0; extension_types[i] != 0; ++i) - { - /* Use something that is not allowed in symbol names */ - g_string_append_c (type_name, '+'); - - g_string_append (type_name, g_type_name (extension_types[i])); - } - - the_type = g_type_from_name (type_name->str); - - if (the_type == G_TYPE_INVALID) - { - GTypeQuery query; - GTypeInfo type_info = { - 0, - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) extension_subclass_init, - (GClassFinalizeFunc) NULL, - g_memdup (extension_types, sizeof (GType) * (i + 1)), - 0, - 0, - (GInstanceInitFunc) extension_subclass_instance_init, - NULL - }; - GInterfaceInfo iface_info = { - (GInterfaceInitFunc) implement_interface_methods, - (GInterfaceFinalizeFunc) NULL, - NULL - }; - - g_debug ("Registering new type '%s'", type_name->str); - - g_type_query (parent_type, &query); - type_info.class_size = query.class_size; - type_info.instance_size = query.instance_size; - - the_type = g_type_register_static (parent_type, type_name->str, - &type_info, 0); - - iface_info.interface_data = GSIZE_TO_POINTER (the_type); - - for (i = 0; extension_types[i] != 0; ++i) - g_type_add_interface_static (the_type, extension_types[i], &iface_info); - } - - /* Must be done outside of type registration - * in the event that the same type is requested again. - */ - for (i = 0; extension_types[i] != 0; ++i) - { - if (!g_type_is_a (the_type, extension_types[i])) - { - g_warning ("Type '%s' is invalid", type_name->str); - the_type = G_TYPE_INVALID; - break; - } - } - - g_string_free (type_name, TRUE); - - return the_type; -} diff --git a/libpeas/peas-extension-subclasses.h b/libpeas/peas-extension-subclasses.h deleted file mode 100644 index 05efa92..0000000 --- a/libpeas/peas-extension-subclasses.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * peas-extension-subclasses.h - * This file is part of libpeas - * - * Copyright (C) 2010 - Steve Frécinaux - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef __PEAS_EXTENSION_SUBCLASSES_H__ -#define __PEAS_EXTENSION_SUBCLASSES_H__ - -#include <glib-object.h> - -G_BEGIN_DECLS - -GType peas_extension_register_subclass (GType parent_type, - GType *extension_types); - -G_END_DECLS - -#endif /* __PEAS_EXTENSION_SUBCLASSES_H__ */ diff --git a/libpeas/peas-extension-wrapper.c b/libpeas/peas-extension-wrapper.c deleted file mode 100644 index c9760ad..0000000 --- a/libpeas/peas-extension-wrapper.c +++ /dev/null @@ -1,100 +0,0 @@ -/* - * peas-extension.c - * This file is part of libpeas - * - * Copyright (C) 2010 Steve Frécinaux - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include "peas-extension-wrapper.h" -#include "peas-introspection.h" - -G_DEFINE_ABSTRACT_TYPE (PeasExtensionWrapper, peas_extension_wrapper, G_TYPE_OBJECT) - -static void -peas_extension_wrapper_init (PeasExtensionWrapper *exten) -{ -} - -static void -peas_extension_wrapper_constructed (GObject *object) -{ - PeasExtensionWrapper *exten = PEAS_EXTENSION_WRAPPER (object); - - exten->constructed = TRUE; - - G_OBJECT_CLASS (peas_extension_wrapper_parent_class)->constructed (object); -} - -static void -peas_extension_wrapper_dispose (GObject *object) -{ - PeasExtensionWrapper *exten = PEAS_EXTENSION_WRAPPER (object); - - if (exten->interfaces != NULL) - { - g_free (exten->interfaces); - exten->interfaces = NULL; - } - - if (G_OBJECT_CLASS (peas_extension_wrapper_parent_class)->dispose != NULL) - G_OBJECT_CLASS (peas_extension_wrapper_parent_class)->dispose (object); -} - -static void -peas_extension_wrapper_class_init (PeasExtensionWrapperClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS (klass); - - object_class->constructed = peas_extension_wrapper_constructed; - object_class->dispose = peas_extension_wrapper_dispose; - - /* Don't add properties as they could shadow the instance's - * and C plugins would not have the property. - */ -} - -GType -peas_extension_wrapper_get_extension_type (PeasExtensionWrapper *exten) -{ - g_return_val_if_fail (PEAS_IS_EXTENSION_WRAPPER (exten), G_TYPE_INVALID); - - return exten->exten_type; -} - -gboolean -peas_extension_wrapper_callv (PeasExtensionWrapper *exten, - GType interface_type, - GICallableInfo *method_info, - const gchar *method_name, - GIArgument *args, - GIArgument *return_value) -{ - PeasExtensionWrapperClass *klass; - - g_return_val_if_fail (PEAS_IS_EXTENSION_WRAPPER (exten), FALSE); - g_return_val_if_fail (interface_type != G_TYPE_INVALID, FALSE); - g_return_val_if_fail (method_info != NULL, FALSE); - g_return_val_if_fail (method_name != NULL, FALSE); - - klass = PEAS_EXTENSION_WRAPPER_GET_CLASS (exten); - return klass->call (exten, interface_type, method_info, - method_name, args, return_value); -} diff --git a/libpeas/peas-extension-wrapper.h b/libpeas/peas-extension-wrapper.h deleted file mode 100644 index a0a8a95..0000000 --- a/libpeas/peas-extension-wrapper.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * peas-extension-wrapper.h - * This file is part of libpeas - * - * Copyright (C) 2010-2011 - Steve Frécinaux - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef __PEAS_EXTENSION_WRAPPER_H__ -#define __PEAS_EXTENSION_WRAPPER_H__ - -#include <glib-object.h> -#include <girepository.h> - -G_BEGIN_DECLS - -/* - * Type checking and casting macros - */ -#define PEAS_TYPE_EXTENSION_WRAPPER (peas_extension_wrapper_get_type ()) -#define PEAS_EXTENSION_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PEAS_TYPE_EXTENSION_WRAPPER, PeasExtensionWrapper)) -#define PEAS_IS_EXTENSION_WRAPPER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PEAS_TYPE_EXTENSION_WRAPPER)) -#define PEAS_EXTENSION_WRAPPER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PEAS_TYPE_EXTENSION_WRAPPER, PeasExtensionWrapperClass)) -#define PEAS_IS_EXTENSION_WRAPPER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PEAS_TYPE_EXTENSION_WRAPPER)) -#define PEAS_EXTENSION_WRAPPER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PEAS_TYPE_EXTENSION_WRAPPER, PeasExtensionWrapperClass)) - -typedef struct _PeasExtensionWrapper PeasExtensionWrapper; -typedef struct _PeasExtensionWrapperClass PeasExtensionWrapperClass; - -struct _PeasExtensionWrapper { - GObject parent; - - /*< private >*/ - GType exten_type; - GType *interfaces; - gboolean constructed; -}; - -struct _PeasExtensionWrapperClass { - GObjectClass parent_class; - - /*< private >*/ - gboolean (*call) (PeasExtensionWrapper *exten, - GType interface_type, - GICallableInfo *method_info, - const gchar *method, - GIArgument *args, - GIArgument *return_value); -}; - -/* - * Public methods - */ -GType peas_extension_wrapper_get_type (void) G_GNUC_CONST; - -GType peas_extension_wrapper_get_extension_type - (PeasExtensionWrapper *exten); - -gboolean peas_extension_wrapper_callv (PeasExtensionWrapper *exten, - GType interface_type, - GICallableInfo *method_info, - const gchar *method_name, - GIArgument *args, - GIArgument *return_value); - -G_END_DECLS - -#endif /* __PEAS_EXTENSION_WRAPPER_H__ */ diff --git a/libpeas/peas-extension.c b/libpeas/peas-extension.c index 31e12b0..a100c93 100644 --- a/libpeas/peas-extension.c +++ b/libpeas/peas-extension.c @@ -24,7 +24,6 @@ #endif #include "peas-extension.h" -#include "peas-extension-wrapper.h" #include "peas-introspection.h" /** @@ -76,7 +75,6 @@ get_method_info (PeasExtension *exten, GType exten_type; GType *interfaces; GICallableInfo *method_info; - gboolean must_free_interfaces = FALSE; /* Must prioritize the initial GType */ exten_type = peas_extension_get_extension_type (exten); @@ -90,15 +88,7 @@ get_method_info (PeasExtension *exten, return method_info; } - if (PEAS_IS_EXTENSION_WRAPPER (exten)) - { - interfaces = PEAS_EXTENSION_WRAPPER (exten)->interfaces; - } - else - { - must_free_interfaces = TRUE; - interfaces = g_type_interfaces (G_TYPE_FROM_INSTANCE (exten), NULL); - } + interfaces = g_type_interfaces (G_TYPE_FROM_INSTANCE (exten), NULL); for (i = 0; interfaces[i] != G_TYPE_INVALID; ++i) { @@ -113,12 +103,10 @@ get_method_info (PeasExtension *exten, } } - if (must_free_interfaces) - g_free (interfaces); - if (method_info == NULL) g_warning ("Could not find the interface for method '%s'", method_name); + g_free (interfaces); return method_info; } @@ -135,14 +123,8 @@ get_method_info (PeasExtension *exten, GType peas_extension_get_extension_type (PeasExtension *exten) { - if (PEAS_IS_EXTENSION_WRAPPER (exten)) - { - return peas_extension_wrapper_get_extension_type (PEAS_EXTENSION_WRAPPER (exten)); - } - else - { - return (GType) g_object_get_data (G_OBJECT (exten), "peas-extension-type"); - } + return GPOINTER_TO_SIZE (g_object_get_data (G_OBJECT (exten), + "peas-extension-type")); } /** @@ -277,17 +259,8 @@ peas_extension_callv (PeasExtension *exten, if (method_info == NULL) return FALSE; - if (PEAS_IS_EXTENSION_WRAPPER (exten)) - { - success = peas_extension_wrapper_callv (PEAS_EXTENSION_WRAPPER (exten), - interface, method_info, - method_name, args, return_value); - } - else - { - success = peas_gi_method_call (G_OBJECT (exten), method_info, interface, - method_name, args, return_value); - } + success = peas_gi_method_call (G_OBJECT (exten), method_info, interface, + method_name, args, return_value); g_base_info_unref (method_info); return success; diff --git a/libpeas/peas-introspection.c b/libpeas/peas-introspection.c index b9eb005..ddbcf7a 100644 --- a/libpeas/peas-introspection.c +++ b/libpeas/peas-introspection.c @@ -238,73 +238,6 @@ peas_gi_argument_to_pointer (GITypeInfo *type_info, } } -void -peas_gi_pointer_to_argument (GITypeInfo *type_info, - gpointer ptr, - GIArgument *arg) -{ - g_return_if_fail (ptr != NULL); - - switch (g_type_info_get_tag (type_info)) - { - case GI_TYPE_TAG_VOID: - arg->v_pointer = *((gpointer **) ptr); - break; - case GI_TYPE_TAG_BOOLEAN: - arg->v_boolean = *((gboolean *) ptr); - break; - case GI_TYPE_TAG_INT8: - arg->v_int8 = *((gint8 *) ptr); - break; - case GI_TYPE_TAG_UINT8: - arg->v_uint8 = *((guint8 *) ptr); - break; - case GI_TYPE_TAG_INT16: - arg->v_int16 = *((gint16 *) ptr); - break; - case GI_TYPE_TAG_UINT16: - arg->v_uint16 = *((guint16 *) ptr); - break; - case GI_TYPE_TAG_INT32: - arg->v_int32 = *((gint32 *) ptr); - break; - case GI_TYPE_TAG_UNICHAR: - case GI_TYPE_TAG_UINT32: - arg->v_uint32 = *((guint32 *) ptr); - break; - case GI_TYPE_TAG_INT64: - arg->v_int64 = *((gint64 *) ptr); - break; - case GI_TYPE_TAG_UINT64: - arg->v_uint64 = *((guint64 *) ptr); - break; - case GI_TYPE_TAG_FLOAT: - arg->v_float = *((gfloat *) ptr); - break; - case GI_TYPE_TAG_DOUBLE: - arg->v_double = *((gdouble *) ptr); - break; - case GI_TYPE_TAG_GTYPE: - /* apparently, GType is meant to be a gsize, from gobject/gtype.h in glib */ - arg->v_size = *((gsize *) ptr); - break; - case GI_TYPE_TAG_UTF8: - case GI_TYPE_TAG_FILENAME: - arg->v_string = *((gchar **) ptr); - break; - case GI_TYPE_TAG_ARRAY: - case GI_TYPE_TAG_INTERFACE: - case GI_TYPE_TAG_GLIST: - case GI_TYPE_TAG_GSLIST: - case GI_TYPE_TAG_GHASH: - case GI_TYPE_TAG_ERROR: - arg->v_pointer = *((gpointer **) ptr); - break; - default: - g_return_if_reached (); - } -} - GICallableInfo * peas_gi_get_method_info (GType iface_type, const gchar *method_name) @@ -340,107 +273,6 @@ peas_gi_get_method_info (GType iface_type, return (GICallableInfo *) func_info; } -/* Only for interfaces! */ -GType -peas_gi_get_type_from_name (const gchar *type_name) -{ - guint i; - gchar **ns; - GType the_type = G_TYPE_INVALID; - - /* Hope for the best */ - the_type = g_type_from_name (type_name); - - if (the_type != G_TYPE_INVALID) - return the_type; - - ns = g_irepository_get_loaded_namespaces (NULL); - - /* Attempt to find it via naming conventions */ - for (i = 0; ns[i] != NULL; ++i) - { - gsize len; - - /* Allow GLib, GObject and Gio Interfaces to use the fast path */ - if (g_strcmp0 (ns[i], "GLib") == 0 || - g_strcmp0 (ns[i], "GObject") == 0 || - g_strcmp0 (ns[i], "Gio") == 0) - len = 1; - else - len = strlen (ns[i]); - - /* Only compare the prefix of the type name */ - if (strncmp (type_name, ns[i], len) == 0) - { - GIBaseInfo *info; - - info = g_irepository_find_by_name (NULL, ns[i], type_name + len); - - if (info != NULL) - { - if (!GI_IS_INTERFACE_INFO (info)) - { - g_base_info_unref (info); - } - else - { - g_registered_type_info_get_g_type (info); - g_base_info_unref (info); - - /* It might not be the correct interface */ - the_type = g_type_from_name (type_name); - - if (the_type != G_TYPE_INVALID) - break; - } - } - - /* Cannot break here otherwise PeasGtk symbols would not be found */ - } - } - - /* The all or nothing approach, on the upside this - * will cause g_type_name() on many other types to work. - */ - if (the_type == G_TYPE_INVALID) - { - for (i = 0; ns[i] != NULL; ++i) - { - gint j; - gint n_infos; - - n_infos = g_irepository_get_n_infos (NULL, ns[i]); - - for (j = 0; j < n_infos; ++j) - { - GIBaseInfo *info; - - info = g_irepository_get_info (NULL, ns[i], j); - - if (!GI_IS_INTERFACE_INFO (info)) - { - g_base_info_unref (info); - } - else - { - g_registered_type_info_get_g_type (info); - g_base_info_unref (info); - - the_type = g_type_from_name (type_name); - - if (the_type != G_TYPE_INVALID) - break; - } - } - } - } - - /* Seems they did not import it */ - - g_strfreev (ns); - return the_type; -} - gboolean peas_gi_method_call (GObject *instance, GICallableInfo *func_info, diff --git a/libpeas/peas-introspection.h b/libpeas/peas-introspection.h index 802f645..c3c766b 100644 --- a/libpeas/peas-introspection.h +++ b/libpeas/peas-introspection.h @@ -30,8 +30,6 @@ G_BEGIN_DECLS GICallableInfo *peas_gi_get_method_info (GType iface_type, const gchar *method_name); -GType peas_gi_get_type_from_name (const gchar *type_name); - void peas_gi_valist_to_arguments (GICallableInfo *callable_info, va_list va_args, GIArgument *arguments, @@ -39,9 +37,6 @@ void peas_gi_valist_to_arguments (GICallableInfo *callable_info void peas_gi_argument_to_pointer (GITypeInfo *type_info, GIArgument *arg, gpointer ptr); -void peas_gi_pointer_to_argument (GITypeInfo *type_info, - gpointer ptr, - GIArgument *arg); gboolean peas_gi_method_call (GObject *instance, GICallableInfo *method_info, GType iface_type, diff --git a/libpeas/peas-plugin-loader-c.c b/libpeas/peas-plugin-loader-c.c index a49ab3b..c5a488d 100644 --- a/libpeas/peas-plugin-loader-c.c +++ b/libpeas/peas-plugin-loader-c.c @@ -135,11 +135,11 @@ peas_plugin_loader_c_create_extension (PeasPluginLoader *loader, g_return_val_if_fail (G_IS_OBJECT (instance), NULL); g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (instance, exten_type), NULL); - /* As we do not instantiate a PeasExtensionWrapper, we have to remember - * somehow which interface we are instantiating, to make it possible to use - * the deprecated peas_extension_get_extension_type() method. + /* We have to remember which interface we are instantiating + * for the deprecated peas_extension_get_extension_type(). */ - g_object_set_data (instance, "peas-extension-type", GUINT_TO_POINTER (exten_type)); + g_object_set_data (instance, "peas-extension-type", + GSIZE_TO_POINTER (exten_type)); return instance; } diff --git a/loaders/python/peas-plugin-loader-python.c b/loaders/python/peas-plugin-loader-python.c index e0f587e..0e8cd7e 100644 --- a/loaders/python/peas-plugin-loader-python.c +++ b/loaders/python/peas-plugin-loader-python.c @@ -188,12 +188,11 @@ peas_plugin_loader_python_create_extension (PeasPluginLoader *loader, if (!object) goto out; - /* As we do not instantiate a PeasExtensionWrapper, we have to remember - * somehow which interface we are instantiating, to make it possible to use - * the deprecated peas_extension_get_extension_type() method. + /* We have to remember which interface we are instantiating + * for the deprecated peas_extension_get_extension_type(). */ g_object_set_data (object, "peas-extension-type", - GUINT_TO_POINTER (exten_type)); + GSIZE_TO_POINTER (exten_type)); pyobject = pygobject_new (object); pyplinfo = pyg_boxed_new (PEAS_TYPE_PLUGIN_INFO, info, TRUE, TRUE); diff --git a/tests/libpeas/introspection/Makefile.am b/tests/libpeas/introspection/Makefile.am index de334e7..fb51757 100644 --- a/tests/libpeas/introspection/Makefile.am +++ b/tests/libpeas/introspection/Makefile.am @@ -21,10 +21,6 @@ libintrospection_1_0_la_SOURCES = \ introspection-has-missing-prerequisite.h \ introspection-has-prerequisite.c \ introspection-has-prerequisite.h \ - introspection-properties.c \ - introspection-properties.h \ - introspection-properties-prerequisite.c \ - introspection-properties-prerequisite.h \ introspection-unimplemented.c \ introspection-unimplemented.h diff --git a/tests/libpeas/introspection/introspection-properties-prerequisite.c b/tests/libpeas/introspection/introspection-properties-prerequisite.c deleted file mode 100644 index 2ddb8c0..0000000 --- a/tests/libpeas/introspection/introspection-properties-prerequisite.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * introspection-properties-prerequisite.c - * This file is part of libpeas - * - * Copyright (C) 2012 Garrett Regier - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include "introspection-properties-prerequisite.h" - -G_DEFINE_INTERFACE(IntrospectionPropertiesPrerequisite, - introspection_properties_prerequisite, - G_TYPE_OBJECT) - -void -introspection_properties_prerequisite_default_init (IntrospectionPropertiesPrerequisiteInterface *iface) -{ - static gboolean initialized = FALSE; - -#define DEFINE_PROP(name, flags) \ - g_object_interface_install_property (iface, \ - g_param_spec_string (name, name, \ - name, name, \ - G_PARAM_STATIC_STRINGS | \ - (flags))) - - if (!initialized) - { - DEFINE_PROP ("prerequisite", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); - - initialized = TRUE; - } - -#undef DEFINE_PROP -} diff --git a/tests/libpeas/introspection/introspection-properties-prerequisite.h b/tests/libpeas/introspection/introspection-properties-prerequisite.h deleted file mode 100644 index 233a91b..0000000 --- a/tests/libpeas/introspection/introspection-properties-prerequisite.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * introspection-properties-prerequisite.h - * This file is part of libpeas - * - * Copyright (C) 2012 - Garrett Regier - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef __INTROSPECTION_PROPERTIES_PREREQUISITE_H__ -#define __INTROSPECTION_PROPERTIES_PREREQUISITE_H__ - -#include <glib-object.h> - -G_BEGIN_DECLS - -/* - * Type checking and casting macros - */ -#define INTROSPECTION_TYPE_PROPERTIES_PREREQUISITE (introspection_properties_prerequisite_get_type ()) -#define INTROSPECTION_PROPERTIES_PREREQUISITE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INTROSPECTION_TYPE_PROPERTIES_PREREQUISITE, IntrospectionProperties)) -#define INTROSPECTION_PROPERTIES_PREREQUISITE_IFACE(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), INTROSPECTION_TYPE_PROPERTIES_PREREQUISITE, IntrospectionPropertiesInterface)) -#define INTROSPECTION_IS_PROPERTIES_PREREQUISITE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INTROSPECTION_TYPE_PROPERTIES_PREREQUISITE)) -#define INTROSPECTION_PROPERTIES_PREREQUISITE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), INTROSPECTION_TYPE_PROPERTIES_PREREQUISITE, IntrospectionPropertiesInterface)) - -typedef struct _IntrospectionPropertiesPrerequisite IntrospectionPropertiesPrerequisite; /* dummy typedef */ -typedef struct _IntrospectionPropertiesPrerequisiteInterface IntrospectionPropertiesPrerequisiteInterface; - -struct _IntrospectionPropertiesPrerequisiteInterface { - GTypeInterface g_iface; -}; - -/* - * Public methods - */ -GType introspection_properties_prerequisite_get_type (void) G_GNUC_CONST; - -G_END_DECLS - -#endif /* __INTROSPECTION_PROPERTIES_PREREQUISITE_H__ */ diff --git a/tests/libpeas/introspection/introspection-properties.c b/tests/libpeas/introspection/introspection-properties.c deleted file mode 100644 index 86132d5..0000000 --- a/tests/libpeas/introspection/introspection-properties.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * introspection-properties.h - * This file is part of libpeas - * - * Copyright (C) 2010 Garrett Regier - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include "introspection-properties.h" - -#include "introspection-properties-prerequisite.h" - -G_DEFINE_INTERFACE(IntrospectionProperties, - introspection_properties, - INTROSPECTION_TYPE_PROPERTIES_PREREQUISITE) - -void -introspection_properties_default_init (IntrospectionPropertiesInterface *iface) -{ - static gboolean initialized = FALSE; - -#define DEFINE_PROP(name, flags) \ - g_object_interface_install_property (iface, \ - g_param_spec_string (name, name, \ - name, name, \ - G_PARAM_STATIC_STRINGS | \ - (flags))) - - if (!initialized) - { - DEFINE_PROP ("construct-only", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); - DEFINE_PROP ("read-only", G_PARAM_READABLE); - DEFINE_PROP ("write-only", G_PARAM_WRITABLE); - DEFINE_PROP ("readwrite", G_PARAM_READWRITE | G_PARAM_CONSTRUCT); - - initialized = TRUE; - } - -#undef DEFINE_PROP -} diff --git a/tests/libpeas/introspection/introspection-properties.h b/tests/libpeas/introspection/introspection-properties.h deleted file mode 100644 index 70c34f9..0000000 --- a/tests/libpeas/introspection/introspection-properties.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * introspection-properties.h - * This file is part of libpeas - * - * Copyright (C) 2010 - Garrett Regier - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef __INTROSPECTION_PROPERTIES_H__ -#define __INTROSPECTION_PROPERTIES_H__ - -#include <glib-object.h> - -G_BEGIN_DECLS - -/* - * Type checking and casting macros - */ -#define INTROSPECTION_TYPE_PROPERTIES (introspection_properties_get_type ()) -#define INTROSPECTION_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INTROSPECTION_TYPE_PROPERTIES, IntrospectionProperties)) -#define INTROSPECTION_PROPERTIES_IFACE(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), INTROSPECTION_TYPE_PROPERTIES, IntrospectionPropertiesInterface)) -#define INTROSPECTION_IS_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INTROSPECTION_TYPE_PROPERTIES)) -#define INTROSPECTION_PROPERTIES_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), INTROSPECTION_TYPE_PROPERTIES, IntrospectionPropertiesInterface)) - -typedef struct _IntrospectionProperties IntrospectionProperties; /* dummy typedef */ -typedef struct _IntrospectionPropertiesInterface IntrospectionPropertiesInterface; - -struct _IntrospectionPropertiesInterface { - GTypeInterface g_iface; -}; - -/* - * Public methods - */ -GType introspection_properties_get_type (void) G_GNUC_CONST; - -G_END_DECLS - -#endif /* __INTROSPECTION_PROPERTIES_H__ */ diff --git a/tests/libpeas/plugins/extension-python/extension-py.py b/tests/libpeas/plugins/extension-python/extension-py.py index 83eceab..0a3f613 100644 --- a/tests/libpeas/plugins/extension-python/extension-py.py +++ b/tests/libpeas/plugins/extension-python/extension-py.py @@ -5,18 +5,10 @@ from gi.repository import GObject, Introspection, Peas class ExtensionPythonPlugin(GObject.Object, Peas.Activatable, Introspection.Base, Introspection.Callable, - Introspection.PropertiesPrerequisite, - Introspection.Properties, Introspection.HasPrerequisite): object = GObject.property(type=GObject.Object) - construct_only = GObject.property(type=str) - read_only = GObject.property(type=str, default="read-only") - write_only = GObject.property(type=str) - readwrite = GObject.property(type=str, default="readwrite") - prerequisite = GObject.property(type=str) - def do_activate(self): pass diff --git a/tests/libpeas/testing/testing-extension.c b/tests/libpeas/testing/testing-extension.c index 4a0bd72..12f1db3 100644 --- a/tests/libpeas/testing/testing-extension.c +++ b/tests/libpeas/testing/testing-extension.c @@ -37,7 +37,6 @@ #include "introspection-callable.h" #include "introspection-has-missing-prerequisite.h" #include "introspection-has-prerequisite.h" -#include "introspection-properties.h" #include "introspection-unimplemented.h" typedef struct _TestFixture TestFixture; @@ -373,101 +372,6 @@ test_extension_call_multi_args (PeasEngine *engine, g_object_unref (extension); } -static void -test_extension_properties_construct_only (PeasEngine *engine, - PeasPluginInfo *info) -{ - PeasExtension *extension; - gchar *construct_only; - - extension = peas_engine_create_extension (engine, info, - INTROSPECTION_TYPE_PROPERTIES, - "construct-only", "my-construct-only", - NULL); - - g_object_get (extension, "construct-only", &construct_only, NULL); - g_assert_cmpstr (construct_only, ==, "my-construct-only"); - g_free (construct_only); - - g_object_unref (extension); -} - -static void -test_extension_properties_read_only (PeasEngine *engine, - PeasPluginInfo *info) -{ - PeasExtension *extension; - gchar *read_only; - - extension = peas_engine_create_extension (engine, info, - INTROSPECTION_TYPE_PROPERTIES, - NULL); - - g_object_get (extension, "read-only", &read_only, NULL); - g_assert_cmpstr (read_only, ==, "read-only"); - g_free (read_only); - - g_object_unref (extension); -} - -static void -test_extension_properties_write_only (PeasEngine *engine, - PeasPluginInfo *info) -{ - PeasExtension *extension; - - extension = peas_engine_create_extension (engine, info, - INTROSPECTION_TYPE_PROPERTIES, - NULL); - - g_object_set (extension, "write-only", "my-write-only", NULL); - - g_object_unref (extension); -} - -static void -test_extension_properties_readwrite (PeasEngine *engine, - PeasPluginInfo *info) -{ - PeasExtension *extension; - gchar *readwrite; - - extension = peas_engine_create_extension (engine, info, - INTROSPECTION_TYPE_PROPERTIES, - NULL); - - g_object_get (extension, "readwrite", &readwrite, NULL); - g_assert_cmpstr (readwrite, ==, "readwrite"); - g_free (readwrite); - - g_object_set (extension, "readwrite", "my-readwrite", NULL); - - g_object_get (extension, "readwrite", &readwrite, NULL); - g_assert_cmpstr (readwrite, ==, "my-readwrite"); - g_free (readwrite); - - g_object_unref (extension); -} - -static void -test_extension_properties_prerequisite (PeasEngine *engine, - PeasPluginInfo *info) -{ - PeasExtension *extension; - gchar *prerequisite; - - extension = peas_engine_create_extension (engine, info, - INTROSPECTION_TYPE_PROPERTIES, - "prerequisite", "prerequisite", - NULL); - - g_object_get (extension, "prerequisite", &prerequisite, NULL); - g_assert_cmpstr (prerequisite, ==, "prerequisite"); - g_free (prerequisite); - - g_object_unref (extension); -} - #define _EXTENSION_TEST(loader, path, ftest) \ G_STMT_START { \ gchar *full_path = g_strdup_printf (EXTENSION_TEST_NAME (%s, "%s"), \ @@ -521,16 +425,6 @@ testing_extension_callable (const gchar *loader) } void -testing_extension_properties (const gchar *loader) -{ - _EXTENSION_TEST (loader, "properties-construct-only", properties_construct_only); - _EXTENSION_TEST (loader, "properties-read-only", properties_read_only); - _EXTENSION_TEST (loader, "properties-write-only", properties_write_only); - _EXTENSION_TEST (loader, "properties-readwrite", properties_readwrite); - _EXTENSION_TEST (loader, "properties-prerequisite", properties_prerequisite); -} - -void testing_extension_add (const gchar *path, GTestDataFunc func) { diff --git a/tests/libpeas/testing/testing-extension.h b/tests/libpeas/testing/testing-extension.h index 00a5b6e..2ccc072 100644 --- a/tests/libpeas/testing/testing-extension.h +++ b/tests/libpeas/testing/testing-extension.h @@ -30,7 +30,6 @@ G_BEGIN_DECLS void testing_extension_basic (const gchar *loader); void testing_extension_callable (const gchar *loader); -void testing_extension_properties (const gchar *loader); void testing_extension_add (const gchar *path, GTestDataFunc func); @@ -38,8 +37,7 @@ int testing_extension_run_tests (void); #define testing_extension_all(loader) \ testing_extension_basic (loader); \ - testing_extension_callable (loader); \ - testing_extension_properties (loader) + testing_extension_callable (loader); /* These macros are here to add loader-specific tests. */ #define EXTENSION_TEST_NAME(loader, path) \ |