summaryrefslogtreecommitdiff
path: root/plugins/dex
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/dex')
-rw-r--r--plugins/dex/Makefile.am28
-rw-r--r--plugins/dex/core.c7
-rw-r--r--plugins/dex/loading.h4
-rw-r--r--plugins/dex/python/Makefile.am27
-rw-r--r--plugins/dex/python/class.c6
-rw-r--r--plugins/dex/python/field.c6
-rw-r--r--plugins/dex/python/format.c5
-rw-r--r--plugins/dex/python/method.c6
-rw-r--r--plugins/dex/python/pool.c2
-rw-r--r--plugins/dex/python/routine.c5
10 files changed, 48 insertions, 48 deletions
diff --git a/plugins/dex/Makefile.am b/plugins/dex/Makefile.am
index 8eb7bde..a587fe2 100644
--- a/plugins/dex/Makefile.am
+++ b/plugins/dex/Makefile.am
@@ -35,21 +35,23 @@ PYTHON3_SUBDIRS = python
endif
-libdex_la_SOURCES = \
- core.h core.c \
- class.h class.c \
- dex-int.h dex-int.c \
- dex_def.h \
- field.h field.c \
- format.h format.c \
- loading.h loading.c \
- method.h method.c \
- pool.h pool.c \
+libdex_la_SOURCES = \
+ core.h core.c \
+ class.h class.c \
+ dex-int.h dex-int.c \
+ dex_def.h \
+ field.h field.c \
+ format.h format.c \
+ loading.h loading.c \
+ method.h method.c \
+ pool.h pool.c \
routine.h routine.c
-libdex_la_LIBADD = \
+libdex_la_LIBADD = \
$(PYTHON3_LIBADD)
+libdex_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src
+
libdex_la_LDFLAGS = \
-avoid-version \
-L$(top_srcdir)/src/.libs -lchrysacore \
@@ -61,8 +63,4 @@ devdir = $(includedir)/chrysalide/$(subdir)
dev_HEADERS = $(libdex_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/dex/core.c b/plugins/dex/core.c
index 22ebfff..1101a89 100644
--- a/plugins/dex/core.c
+++ b/plugins/dex/core.c
@@ -24,18 +24,17 @@
#include "core.h"
-#include <config.h>
#include <core/global.h>
#include <plugins/self.h>
#include "format.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,7 +64,7 @@ G_MODULE_EXPORT bool chrysalide_plugin_init(GPluginModule *plugin)
{
bool result; /* Bilan à retourner */
-#ifdef HAVE_PYTHON3_BINDINGS
+#ifdef INCLUDE_PYTHON3_BINDINGS
result = add_format_dex_module_to_python_module();
#else
result = true;
diff --git a/plugins/dex/loading.h b/plugins/dex/loading.h
index 5560e4e..4de6df1 100644
--- a/plugins/dex/loading.h
+++ b/plugins/dex/loading.h
@@ -26,9 +26,11 @@
#include <glib-object.h>
+#include <stdbool.h>
+#include <stdint.h>
-#include <gtkext/gtkstatusstack.h>
+#include <glibext/notifier.h>
diff --git a/plugins/dex/python/Makefile.am b/plugins/dex/python/Makefile.am
index e91630e..b627157 100644
--- a/plugins/dex/python/Makefile.am
+++ b/plugins/dex/python/Makefile.am
@@ -1,26 +1,21 @@
noinst_LTLIBRARIES = libdexpython.la
-libdexpython_la_SOURCES = \
- class.h class.c \
- constants.h constants.c \
- field.h field.c \
- format.h format.c \
- method.h method.c \
- module.h module.c \
- pool.h pool.c \
- routine.h routine.c \
+libdexpython_la_SOURCES = \
+ class.h class.c \
+ constants.h constants.c \
+ field.h field.c \
+ format.h format.c \
+ method.h method.c \
+ module.h module.c \
+ pool.h pool.c \
+ routine.h routine.c \
translate.h translate.c
-libdexpython_la_LDFLAGS =
+libdexpython_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
+ -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
devdir = $(includedir)/chrysalide/$(subdir)
dev_HEADERS = $(libdexpython_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/dex/python/class.c b/plugins/dex/python/class.c
index e344124..247197c 100644
--- a/plugins/dex/python/class.c
+++ b/plugins/dex/python/class.c
@@ -584,14 +584,14 @@ PyTypeObject *get_python_dex_class_type(void)
bool register_python_dex_class(PyObject *module)
{
- PyTypeObject *py_dex_class_type; /* Type Python 'DexClass' */
+ PyTypeObject *type; /* Type Python 'DexClass' */
PyObject *dict; /* Dictionnaire du module */
- py_dex_class_type = get_python_dex_class_type();
+ type = get_python_dex_class_type();
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, G_TYPE_DEX_CLASS, py_dex_class_type, &PyGObject_Type))
+ if (!register_class_for_pygobject(dict, G_TYPE_DEX_CLASS, type))
return false;
return true;
diff --git a/plugins/dex/python/field.c b/plugins/dex/python/field.c
index 1381af6..081d0af 100644
--- a/plugins/dex/python/field.c
+++ b/plugins/dex/python/field.c
@@ -181,14 +181,14 @@ PyTypeObject *get_python_dex_field_type(void)
bool register_python_dex_field(PyObject *module)
{
- PyTypeObject *py_dex_field_type; /* Type Python 'DexField' */
+ PyTypeObject *type; /* Type Python 'DexField' */
PyObject *dict; /* Dictionnaire du module */
- py_dex_field_type = get_python_dex_field_type();
+ type = get_python_dex_field_type();
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, G_TYPE_DEX_FIELD, py_dex_field_type, &PyGObject_Type))
+ if (!register_class_for_pygobject(dict, G_TYPE_DEX_FIELD, type))
return false;
return true;
diff --git a/plugins/dex/python/format.c b/plugins/dex/python/format.c
index fa65b25..4a8939b 100644
--- a/plugins/dex/python/format.c
+++ b/plugins/dex/python/format.c
@@ -281,7 +281,10 @@ bool register_python_dex_format(PyObject *module)
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, G_TYPE_DEX_FORMAT, type, get_python_executable_format_type()))
+ if (!ensure_python_executable_format_is_registered())
+ return false;
+
+ if (!register_class_for_pygobject(dict, G_TYPE_DEX_FORMAT, type))
return false;
if (!define_python_dex_format_common_constants(type))
diff --git a/plugins/dex/python/method.c b/plugins/dex/python/method.c
index fc56f29..ed67176 100644
--- a/plugins/dex/python/method.c
+++ b/plugins/dex/python/method.c
@@ -291,14 +291,14 @@ PyTypeObject *get_python_dex_method_type(void)
bool register_python_dex_method(PyObject *module)
{
- PyTypeObject *py_dex_method_type; /* Type Python 'DexMethod' */
+ PyTypeObject *type; /* Type Python 'DexMethod' */
PyObject *dict; /* Dictionnaire du module */
- py_dex_method_type = get_python_dex_method_type();
+ type = get_python_dex_method_type();
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, G_TYPE_DEX_METHOD, py_dex_method_type, &PyGObject_Type))
+ if (!register_class_for_pygobject(dict, G_TYPE_DEX_METHOD, type))
return false;
return true;
diff --git a/plugins/dex/python/pool.c b/plugins/dex/python/pool.c
index ddfc900..0c08865 100644
--- a/plugins/dex/python/pool.c
+++ b/plugins/dex/python/pool.c
@@ -822,7 +822,7 @@ bool register_python_dex_pool(PyObject *module)
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, G_TYPE_DEX_POOL, type, &PyGObject_Type))
+ if (!register_class_for_pygobject(dict, G_TYPE_DEX_POOL, type))
return false;
return true;
diff --git a/plugins/dex/python/routine.c b/plugins/dex/python/routine.c
index 31410c7..af38263 100644
--- a/plugins/dex/python/routine.c
+++ b/plugins/dex/python/routine.c
@@ -165,7 +165,10 @@ bool register_python_dex_routine(PyObject *module)
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, G_TYPE_DEX_ROUTINE, type, get_python_binary_routine_type()))
+ if (!ensure_python_binary_routine_is_registered())
+ return false;
+
+ if (!register_class_for_pygobject(dict, G_TYPE_DEX_ROUTINE, type))
return false;
return true;