summaryrefslogtreecommitdiff
path: root/plugins/dexbnf
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/dexbnf')
-rw-r--r--plugins/dexbnf/Makefile.am20
-rw-r--r--plugins/dexbnf/core.c7
-rw-r--r--plugins/dexbnf/python/Makefile.am13
-rw-r--r--plugins/dexbnf/python/demangler.c10
4 files changed, 22 insertions, 28 deletions
diff --git a/plugins/dexbnf/Makefile.am b/plugins/dexbnf/Makefile.am
index 51598ce..222cc35 100644
--- a/plugins/dexbnf/Makefile.am
+++ b/plugins/dexbnf/Makefile.am
@@ -34,17 +34,19 @@ PYTHON3_SUBDIRS = python
endif
-libdexbnf_la_SOURCES = \
- context.h context.c \
- core.h core.c \
- demangler.h demangler.c \
- simple.h simple.c \
- shorty.h shorty.c \
+libdexbnf_la_SOURCES = \
+ context.h context.c \
+ core.h core.c \
+ demangler.h demangler.c \
+ simple.h simple.c \
+ shorty.h shorty.c \
type.h type.c
-libdexbnf_la_LIBADD = \
+libdexbnf_la_LIBADD = \
$(PYTHON3_LIBADD)
+libdexbnf_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src
+
libdexbnf_la_LDFLAGS = \
-avoid-version \
-L$(top_srcdir)/src/.libs -lchrysacore \
@@ -56,8 +58,4 @@ devdir = $(includedir)/chrysalide/$(subdir)
dev_HEADERS = $(libdexbnf_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/dexbnf/core.c b/plugins/dexbnf/core.c
index 37e5a15..07e7545 100644
--- a/plugins/dexbnf/core.c
+++ b/plugins/dexbnf/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
@@ -67,7 +66,7 @@ G_MODULE_EXPORT bool chrysalide_plugin_init(GPluginModule *plugin)
result = register_demangler_type(G_TYPE_DEX_DEMANGLER);
-#ifdef HAVE_PYTHON3_BINDINGS
+#ifdef INCLUDE_PYTHON3_BINDINGS
if (result)
result = add_mangling_dexbnf_module_to_python_module();
#endif
diff --git a/plugins/dexbnf/python/Makefile.am b/plugins/dexbnf/python/Makefile.am
index 59668eb..95a8b0c 100644
--- a/plugins/dexbnf/python/Makefile.am
+++ b/plugins/dexbnf/python/Makefile.am
@@ -1,19 +1,14 @@
noinst_LTLIBRARIES = libdexbnfpython.la
-libdexbnfpython_la_SOURCES = \
- demangler.h demangler.c \
+libdexbnfpython_la_SOURCES = \
+ demangler.h demangler.c \
module.h module.c
-libdexbnfpython_la_LDFLAGS =
+libdexbnfpython_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
+ -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
devdir = $(includedir)/chrysalide/$(subdir)
dev_HEADERS = $(libdexbnfpython_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/dexbnf/python/demangler.c b/plugins/dexbnf/python/demangler.c
index 3682216..8fc93e4 100644
--- a/plugins/dexbnf/python/demangler.c
+++ b/plugins/dexbnf/python/demangler.c
@@ -140,15 +140,17 @@ PyTypeObject *get_python_dex_demangler_type(void)
bool register_python_dex_demangler(PyObject *module)
{
- PyTypeObject *py_dex_demangler_type; /* Type Python 'DexDemangler' */
+ PyTypeObject *type; /* Type Python 'DexDemangler' */
PyObject *dict; /* Dictionnaire du module */
- py_dex_demangler_type = get_python_dex_demangler_type();
+ type = get_python_dex_demangler_type();
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, G_TYPE_DEX_DEMANGLER,
- py_dex_demangler_type, get_python_compiler_demangler_type()))
+ if (!ensure_python_compiler_demangler_is_registered())
+ return false;
+
+ if (!register_class_for_pygobject(dict, G_TYPE_DEX_DEMANGLER, type))
return false;
return true;