diff options
Diffstat (limited to 'plugins/pychrysalide')
-rw-r--r-- | plugins/pychrysalide/arch/instruction.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/pychrysalide/arch/instruction.c b/plugins/pychrysalide/arch/instruction.c index 8c3d78d..d659c87 100644 --- a/plugins/pychrysalide/arch/instruction.c +++ b/plugins/pychrysalide/arch/instruction.c @@ -115,7 +115,9 @@ static PyObject *py_arch_instruction_get_sources(PyObject *self, void *unused) size_t i; /* Boucle de parcours */ PyObject *linked; /* Source de lien Python */ PyObject *type; /* Nature du lien en Python */ +#ifndef NDEBUG int ret; /* Bilan d'une écriture d'arg. */ +#endif instr = G_ARCH_INSTRUCTION(pygobject_get(self)); @@ -132,8 +134,12 @@ static PyObject *py_arch_instruction_get_sources(PyObject *self, void *unused) linked = pygobject_new(G_OBJECT(source->linked)); type = PyLong_FromLong(source->type); +#ifndef NDEBUG ret = PyTuple_SetItem(result, i, Py_BuildValue("(OO)", linked, type)); assert(ret == 0); +#else + PyTuple_SetItem(result, i, Py_BuildValue("(OO)", linked, type)); +#endif unref_instr_link(source); @@ -168,7 +174,9 @@ static PyObject *py_arch_instruction_get_destinations(PyObject *self, void *unus size_t i; /* Boucle de parcours */ PyObject *linked; /* Destination de lien Python */ PyObject *type; /* Nature du lien en Python */ +#ifndef NDEBUG int ret; /* Bilan d'une écriture d'arg. */ +#endif instr = G_ARCH_INSTRUCTION(pygobject_get(self)); @@ -185,8 +193,12 @@ static PyObject *py_arch_instruction_get_destinations(PyObject *self, void *unus linked = pygobject_new(G_OBJECT(dest->linked)); type = PyLong_FromLong(dest->type); +#ifndef NDEBUG ret = PyTuple_SetItem(result, i, Py_BuildValue("(OO)", linked, type)); assert(ret == 0); +#else + PyTuple_SetItem(result, i, Py_BuildValue("(OO)", linked, type)); +#endif unref_instr_link(dest); @@ -359,7 +371,9 @@ static PyObject *py_arch_instruction_get_operands(PyObject *self, void *unused) size_t i; /* Boucle de parcours */ GArchOperand *operand; /* Opérande à manipuler */ PyObject *opobj; /* Version Python */ +#ifndef NDEBUG int ret; /* Bilan d'une écriture d'arg. */ +#endif instr = G_ARCH_INSTRUCTION(pygobject_get(self)); @@ -375,8 +389,12 @@ static PyObject *py_arch_instruction_get_operands(PyObject *self, void *unused) opobj = pygobject_new(G_OBJECT(operand)); +#ifndef NDEBUG ret = PyTuple_SetItem(result, i, Py_BuildValue("O", opobj)); assert(ret == 0); +#else + PyTuple_SetItem(result, i, Py_BuildValue("O", opobj)); +#endif g_object_unref(G_OBJECT(operand)); |