summaryrefslogtreecommitdiff
path: root/plugins/pychrysa
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pychrysa')
-rw-r--r--plugins/pychrysa/analysis/routine.c4
-rw-r--r--plugins/pychrysa/format/symbol.c2
-rw-r--r--plugins/pychrysa/pychrysa.c4
3 files changed, 7 insertions, 3 deletions
diff --git a/plugins/pychrysa/analysis/routine.c b/plugins/pychrysa/analysis/routine.c
index 98be3a2..1151b96 100644
--- a/plugins/pychrysa/analysis/routine.c
+++ b/plugins/pychrysa/analysis/routine.c
@@ -38,6 +38,7 @@
#include "block.h"
#include "../helpers.h"
+#include "../format/symbol.h"
@@ -285,7 +286,8 @@ bool register_python_binary_routine(PyObject *module)
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, G_TYPE_BIN_ROUTINE, py_binary_routine_type, &PyGObject_Type))
+ if (!register_class_for_pygobject(dict, G_TYPE_BIN_ROUTINE,
+ py_binary_routine_type, get_python_binary_symbol_type()))
return false;
return true;
diff --git a/plugins/pychrysa/format/symbol.c b/plugins/pychrysa/format/symbol.c
index e337ea1..b9ac13c 100644
--- a/plugins/pychrysa/format/symbol.c
+++ b/plugins/pychrysa/format/symbol.c
@@ -361,7 +361,7 @@ PyTypeObject *get_python_binary_symbol_type(void)
.tp_name = "pychrysalide.format.BinSymbol",
.tp_basicsize = sizeof(PyGObject),
- .tp_flags = Py_TPFLAGS_DEFAULT,
+ .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
.tp_doc = "PyChrysalide binary symbol",
diff --git a/plugins/pychrysa/pychrysa.c b/plugins/pychrysa/pychrysa.c
index c971e56..7629132 100644
--- a/plugins/pychrysa/pychrysa.c
+++ b/plugins/pychrysa/pychrysa.c
@@ -389,13 +389,15 @@ PyMODINIT_FUNC PyInit_pychrysalide(void)
/* Interface 'LineGenerator' en premier... */
status = add_glibext_module_to_python_module(result);
+ /* BinRoutine hérite de BinSymbol... */
+ if (status) status = add_format_module_to_python_module(result);
+
if (status) status = register_python_plugin_module(result);
if (status) status = add_analysis_module_to_python_module(result);
if (status) status = add_arch_module_to_python_module(result);
if (status) status = add_common_module_to_python_module(result);
if (status) status = add_core_module_to_python_module(result);
if (status) status = add_debug_module_to_python_module(result);
- if (status) status = add_format_module_to_python_module(result);
if (status) status = add_gtkext_module_to_python_module(result);
if (status) status = add_gui_module_to_python_module(result);