summaryrefslogtreecommitdiff
path: root/plugins/dex/python
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/dex/python')
-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
7 files changed, 29 insertions, 28 deletions
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;