diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-04-28 21:44:18 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-04-28 21:44:18 (GMT) |
commit | 2e867fcae6e91594ae47528ca097952398ffcca4 (patch) | |
tree | c3897d1f27ab3f4f5813a570e7fb0f6988466e7f /plugins/pychrysalide/arch/processor.c | |
parent | 4d370b81498fc93e0199232110e9edeb526fd53b (diff) |
Extended the Python bindings for registers.
Diffstat (limited to 'plugins/pychrysalide/arch/processor.c')
-rw-r--r-- | plugins/pychrysalide/arch/processor.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/pychrysalide/arch/processor.c b/plugins/pychrysalide/arch/processor.c index 37f97a4..557e7a7 100644 --- a/plugins/pychrysalide/arch/processor.c +++ b/plugins/pychrysalide/arch/processor.c @@ -677,6 +677,8 @@ static GArchInstruction *py_arch_processor_disassemble_wrapper(const GArchProces PyObject *pyins; /* Instruction en objet Python */ int ret; /* Bilan d'une conversion */ + result = NULL; + gstate = PyGILState_Ensure(); pyobj = pygobject_new(G_OBJECT(proc)); @@ -696,10 +698,7 @@ static GArchInstruction *py_arch_processor_disassemble_wrapper(const GArchProces Py_DECREF(args); - if (pyins == NULL) - result = NULL; - - else + if (pyins != NULL) { ret = convert_to_arch_instruction(pyins, &result); @@ -721,9 +720,6 @@ static GArchInstruction *py_arch_processor_disassemble_wrapper(const GArchProces } - else - result = NULL; - PyGILState_Release(gstate); return result; |