summaryrefslogtreecommitdiff
path: root/plugins/arm/python/instruction.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/arm/python/instruction.c')
-rw-r--r--plugins/arm/python/instruction.c12
1 files changed, 7 insertions, 5 deletions
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;