diff options
Diffstat (limited to 'plugins/arm/python')
-rw-r--r-- | plugins/arm/python/Makefile.am | 16 | ||||
-rw-r--r-- | plugins/arm/python/instruction.c | 12 | ||||
-rw-r--r-- | plugins/arm/python/processor.c | 9 | ||||
-rw-r--r-- | plugins/arm/python/v7/Makefile.am | 15 | ||||
-rw-r--r-- | plugins/arm/python/v7/instruction.c | 11 | ||||
-rw-r--r-- | plugins/arm/python/v7/processor.c | 10 |
6 files changed, 36 insertions, 37 deletions
diff --git a/plugins/arm/python/Makefile.am b/plugins/arm/python/Makefile.am index f09baee..931b2b9 100644 --- a/plugins/arm/python/Makefile.am +++ b/plugins/arm/python/Makefile.am @@ -1,15 +1,16 @@ noinst_LTLIBRARIES = libarmpython.la -libarmpython_la_SOURCES = \ - instruction.h instruction.c \ - module.h module.c \ +libarmpython_la_SOURCES = \ + instruction.h instruction.c \ + module.h module.c \ processor.h processor.c -libarmpython_la_LIBADD = \ +libarmpython_la_LIBADD = \ v7/libarmpythonv7.la -libarmpython_la_LDFLAGS = +libarmpython_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) @@ -17,9 +18,4 @@ devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libarmpython_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) - SUBDIRS = v7 diff --git a/plugins/arm/python/instruction.c b/plugins/arm/python/instruction.c index 81fd132..8a37d92 100644 --- a/plugins/arm/python/instruction.c +++ b/plugins/arm/python/instruction.c @@ -93,17 +93,19 @@ PyTypeObject *get_python_arm_instruction_type(void) bool register_python_arm_instruction(PyObject *module) { - PyTypeObject *py_arm_instruction_type; /* Type Python 'BinContent' */ + PyTypeObject *type; /* Type Python 'ArmInstruction'*/ PyObject *dict; /* Dictionnaire du module */ - py_arm_instruction_type = get_python_arm_instruction_type(); + type = get_python_arm_instruction_type(); - APPLY_ABSTRACT_FLAG(py_arm_instruction_type); + APPLY_ABSTRACT_FLAG(type); dict = PyModule_GetDict(module); - if (!register_class_for_pygobject(dict, G_TYPE_ARM_INSTRUCTION, - py_arm_instruction_type, get_python_arch_instruction_type())) + if (!ensure_python_arch_instruction_is_registered()) + return false; + + if (!register_class_for_pygobject(dict, G_TYPE_ARM_INSTRUCTION, type)) return false; return true; diff --git a/plugins/arm/python/processor.c b/plugins/arm/python/processor.c index 1681f52..6a31611 100644 --- a/plugins/arm/python/processor.c +++ b/plugins/arm/python/processor.c @@ -93,14 +93,17 @@ PyTypeObject *get_python_arm_processor_type(void) bool register_python_arm_processor(PyObject *module) { - PyTypeObject *py_arm_processor_type; /* Type Python 'BinContent' */ + PyTypeObject *type; /* Type Python 'ArmProcessor' */ PyObject *dict; /* Dictionnaire du module */ - py_arm_processor_type = get_python_arm_processor_type(); + type = get_python_arm_processor_type(); dict = PyModule_GetDict(module); - if (!register_class_for_pygobject(dict, G_TYPE_ARM_PROCESSOR, py_arm_processor_type, get_python_arch_processor_type())) + if (!ensure_python_arch_processor_is_registered()) + return false; + + if (!register_class_for_pygobject(dict, G_TYPE_ARM_PROCESSOR, type)) return false; return true; diff --git a/plugins/arm/python/v7/Makefile.am b/plugins/arm/python/v7/Makefile.am index 06dc4af..a350d90 100644 --- a/plugins/arm/python/v7/Makefile.am +++ b/plugins/arm/python/v7/Makefile.am @@ -1,20 +1,15 @@ noinst_LTLIBRARIES = libarmpythonv7.la -libarmpythonv7_la_SOURCES = \ - instruction.h instruction.c \ - module.h module.c \ +libarmpythonv7_la_SOURCES = \ + instruction.h instruction.c \ + module.h module.c \ processor.h processor.c -libarmpythonv7_la_LDFLAGS = +libarmpythonv7_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \ + -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT devdir = $(includedir)/chrysalide/$(subdir) dev_HEADERS = $(libarmpythonv7_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/arm/python/v7/instruction.c b/plugins/arm/python/v7/instruction.c index 81b34c3..27171ac 100644 --- a/plugins/arm/python/v7/instruction.c +++ b/plugins/arm/python/v7/instruction.c @@ -83,7 +83,7 @@ PyTypeObject *get_python_armv7_instruction_type(void) * * * Paramètres : module = module dont la définition est à compléter. * * * -* Description : Prend en charge l'objet 'pychrysalide....arm.ArmInstruction'.* +* Description : Prend en charge l'objet 'pychrysalide.....ArmV7Instruction'. * * * * Retour : Bilan de l'opération. * * * @@ -93,15 +93,16 @@ PyTypeObject *get_python_armv7_instruction_type(void) bool register_python_armv7_instruction(PyObject *module) { - PyTypeObject *py_armv7_instruction_type;/* Type Python 'BinContent' */ + PyTypeObject *type; /* Type 'ArmV7Instruction' */ PyObject *dict; /* Dictionnaire du module */ - py_armv7_instruction_type = get_python_armv7_instruction_type(); + type = get_python_armv7_instruction_type(); dict = PyModule_GetDict(module); - if (!register_class_for_pygobject(dict, G_TYPE_ARMV7_INSTRUCTION, - py_armv7_instruction_type, get_python_arm_instruction_type())) + /* TODO : ensure get_python_arm_instruction_type() */ + + if (!register_class_for_pygobject(dict, G_TYPE_ARMV7_INSTRUCTION, type)) return false; return true; diff --git a/plugins/arm/python/v7/processor.c b/plugins/arm/python/v7/processor.c index 6a1e3f0..5d5ea5c 100644 --- a/plugins/arm/python/v7/processor.c +++ b/plugins/arm/python/v7/processor.c @@ -83,7 +83,7 @@ PyTypeObject *get_python_armv7_processor_type(void) * * * Paramètres : module = module dont la définition est à compléter. * * * -* Description : Prend en charge l'objet 'pychrysalide.arch.arm.ArmProcessor'.* +* Description : Prend en charge l'objet 'pychrysalide.....ArmV7Processor'. * * * * Retour : Bilan de l'opération. * * * @@ -93,14 +93,16 @@ PyTypeObject *get_python_armv7_processor_type(void) bool register_python_armv7_processor(PyObject *module) { - PyTypeObject *py_armv7_processor_type; /* Type Python 'BinContent' */ + PyTypeObject *type; /* Type Python 'ArmV7Processor'*/ PyObject *dict; /* Dictionnaire du module */ - py_armv7_processor_type = get_python_armv7_processor_type(); + type = get_python_armv7_processor_type(); dict = PyModule_GetDict(module); - if (!register_class_for_pygobject(dict, G_TYPE_ARMV7_PROCESSOR, py_armv7_processor_type, get_python_arm_processor_type())) + /* TODO : ensure get_python_arm_processor_type() */ + + if (!register_class_for_pygobject(dict, G_TYPE_ARMV7_PROCESSOR, type)) return false; return true; |