diff options
Diffstat (limited to 'plugins/itanium')
-rw-r--r-- | plugins/itanium/Makefile.am | 20 | ||||
-rw-r--r-- | plugins/itanium/core.c | 9 | ||||
-rw-r--r-- | plugins/itanium/demangler.c | 27 | ||||
-rw-r--r-- | plugins/itanium/python/Makefile.am | 13 | ||||
-rw-r--r-- | plugins/itanium/python/demangler.c | 10 |
5 files changed, 50 insertions, 29 deletions
diff --git a/plugins/itanium/Makefile.am b/plugins/itanium/Makefile.am index e1b2d9e..eee0da4 100644 --- a/plugins/itanium/Makefile.am +++ b/plugins/itanium/Makefile.am @@ -35,17 +35,19 @@ PYTHON3_SUBDIRS = python endif -libitanium_la_SOURCES = \ - abi.h abi.c \ - component-int.h \ - component.h component.c \ - context.h context.c \ - core.h core.c \ +libitanium_la_SOURCES = \ + abi.h abi.c \ + component-int.h \ + component.h component.c \ + context.h context.c \ + core.h core.c \ demangler.h demangler.c -libitanium_la_LIBADD = \ +libitanium_la_LIBADD = \ $(PYTHON3_LIBADD) +libitanium_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src + libitanium_la_LDFLAGS = \ -avoid-version \ -L$(top_srcdir)/src/.libs -lchrysacore \ @@ -57,8 +59,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libitanium_la_SOURCES:%c=) -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) - SUBDIRS = $(PYTHON3_SUBDIRS) diff --git a/plugins/itanium/core.c b/plugins/itanium/core.c index 6bf67c1..3f3feb0 100644 --- a/plugins/itanium/core.c +++ b/plugins/itanium/core.c @@ -24,18 +24,17 @@ #include "core.h" -#include <config.h> #include <core/demanglers.h> #include <plugins/self.h> #include "demangler.h" -#ifdef HAVE_PYTHON3_BINDINGS +#ifdef INCLUDE_PYTHON3_BINDINGS # include "python/module.h" #endif -#ifdef HAVE_PYTHON3_BINDINGS +#ifdef INCLUDE_PYTHON3_BINDINGS # define PG_REQ RL("PyChrysalide") #else # define PG_REQ NO_REQ @@ -65,9 +64,9 @@ G_MODULE_EXPORT bool chrysalide_plugin_init(GPluginModule *plugin) { bool result; /* Bilan à retourner */ - result = register_demangler_type("itanium", G_TYPE_ITANIUM_DEMANGLER); + result = register_demangler_type(G_TYPE_ITANIUM_DEMANGLER); -#ifdef HAVE_PYTHON3_BINDINGS +#ifdef INCLUDE_PYTHON3_BINDINGS if (result) result = add_mangling_itanium_module_to_python_module(); #endif diff --git a/plugins/itanium/demangler.c b/plugins/itanium/demangler.c index 5fe0d09..fc445f5 100644 --- a/plugins/itanium/demangler.c +++ b/plugins/itanium/demangler.c @@ -58,6 +58,9 @@ static void g_itanium_demangler_dispose(GItaniumDemangler *); /* Procède à la libération totale de la mémoire. */ static void g_itanium_demangler_finalize(GItaniumDemangler *); +/* Fournit la désignation interne du décodeur de désignations. */ +static char *g_itanium_demangler_get_key(const GItaniumDemangler *); + /* Indique le type défini pour un décodeur de désignations. */ @@ -88,6 +91,7 @@ static void g_itanium_demangler_class_init(GItaniumDemanglerClass *klass) demangler = G_COMP_DEMANGLER_CLASS(klass); + demangler->get_key = (get_demangler_key_fc)g_itanium_demangler_get_key; demangler->can_demangle = (can_be_demangled_fc)NULL; demangler->ns_sep = "::"; @@ -173,3 +177,26 @@ GCompDemangler *g_itanium_demangler_new(void) return G_COMP_DEMANGLER(result); } + + +/****************************************************************************** +* * +* Paramètres : demangler = décodeur à consulter. * +* * +* Description : Fournit la désignation interne du décodeur de désignations. * +* * +* Retour : Simple chaîne de caractères. * +* * +* Remarques : - * +* * +******************************************************************************/ + +static char *g_itanium_demangler_get_key(const GItaniumDemangler *demangler) +{ + char *result; /* Désignation à renvoyer */ + + result = strdup("itanium"); + + return result; + +} diff --git a/plugins/itanium/python/Makefile.am b/plugins/itanium/python/Makefile.am index b0a3da1..a00bda8 100644 --- a/plugins/itanium/python/Makefile.am +++ b/plugins/itanium/python/Makefile.am @@ -1,19 +1,14 @@ noinst_LTLIBRARIES = libitaniumpython.la -libitaniumpython_la_SOURCES = \ - demangler.h demangler.c \ +libitaniumpython_la_SOURCES = \ + demangler.h demangler.c \ module.h module.c -libitaniumpython_la_LDFLAGS = +libitaniumpython_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libitaniumpython_la_SOURCES:%c=) - - -AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ - -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT - -AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS) diff --git a/plugins/itanium/python/demangler.c b/plugins/itanium/python/demangler.c index 5819ac4..12cc6c5 100644 --- a/plugins/itanium/python/demangler.c +++ b/plugins/itanium/python/demangler.c @@ -140,15 +140,17 @@ PyTypeObject *get_python_itanium_demangler_type(void) bool register_python_itanium_demangler(PyObject *module) { - PyTypeObject *py_itanium_demangler_type;/* Type 'ItaniumDemangler' */ + PyTypeObject *type; /* Type 'ItaniumDemangler' */ PyObject *dict; /* Dictionnaire du module */ - py_itanium_demangler_type = get_python_itanium_demangler_type(); + type = get_python_itanium_demangler_type(); dict = PyModule_GetDict(module); - if (!register_class_for_pygobject(dict, G_TYPE_ITANIUM_DEMANGLER, - py_itanium_demangler_type, get_python_compiler_demangler_type())) + if (!ensure_python_compiler_demangler_is_registered()) + return false; + + if (!register_class_for_pygobject(dict, G_TYPE_ITANIUM_DEMANGLER, type)) return false; return true; |