summaryrefslogtreecommitdiff
path: root/plugins/pychrysa/arch
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pychrysa/arch')
-rw-r--r--plugins/pychrysa/arch/instruction.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/plugins/pychrysa/arch/instruction.c b/plugins/pychrysa/arch/instruction.c
index ff3d2ad..f52b1ad 100644
--- a/plugins/pychrysa/arch/instruction.c
+++ b/plugins/pychrysa/arch/instruction.c
@@ -103,8 +103,7 @@ static PyObject *py_arch_instruction_get_sources(PyObject *self, PyObject *args)
{
PyObject *result; /* Instance à retourner */
GArchInstruction *instr; /* Version native */
- GArchInstruction **dests; /* Destination des liens */
- InstructionLinkType *types; /* Nature de ces liens */
+ instr_link_t *sources; /* Origine des liens */
size_t count; /* Nombre de liens présents */
size_t i; /* Boucle de parcours */
PyObject *dest; /* Destination de lien Python */
@@ -113,14 +112,14 @@ static PyObject *py_arch_instruction_get_sources(PyObject *self, PyObject *args)
instr = G_ARCH_INSTRUCTION(pygobject_get(self));
- count = g_arch_instruction_get_sources(instr, &dests, &types);
+ count = g_arch_instruction_get_sources(instr, &sources);
result = PyTuple_New(count);
for (i = 0; i < count; i++)
{
- dest = pygobject_new(G_OBJECT(dests[i]));
- type = PyLong_FromLong(types[i]);
+ dest = pygobject_new(G_OBJECT(sources[i].linked));
+ type = PyLong_FromLong(sources[i].type);
ret = PyTuple_SetItem(result, i, Py_BuildValue("(OO)", dest, type));
assert(ret == 0);
@@ -149,8 +148,7 @@ static PyObject *py_arch_instruction_get_destinations(PyObject *self, PyObject *
{
PyObject *result; /* Instance à retourner */
GArchInstruction *instr; /* Version native */
- GArchInstruction **dests; /* Destination des liens */
- InstructionLinkType *types; /* Nature de ces liens */
+ instr_link_t *dests; /* Destination des liens */
size_t count; /* Nombre de liens présents */
size_t i; /* Boucle de parcours */
PyObject *dest; /* Destination de lien Python */
@@ -159,14 +157,14 @@ static PyObject *py_arch_instruction_get_destinations(PyObject *self, PyObject *
instr = G_ARCH_INSTRUCTION(pygobject_get(self));
- count = g_arch_instruction_get_destinations(instr, &dests, &types);
+ count = g_arch_instruction_get_destinations(instr, &dests);
result = PyTuple_New(count);
for (i = 0; i < count; i++)
{
- dest = pygobject_new(G_OBJECT(dests[i]));
- type = PyLong_FromLong(types[i]);
+ dest = pygobject_new(G_OBJECT(dests[i].linked));
+ type = PyLong_FromLong(dests[i].type);
ret = PyTuple_SetItem(result, i, Py_BuildValue("(OO)", dest, type));
assert(ret == 0);