summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/arch/instructions
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-06-07 21:27:00 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-06-07 21:27:00 (GMT)
commitaf09ab29930ea07eec6118839d53e59af85a6dc8 (patch)
treeb515124ff08852318b07c0883ecc0941a15aa1a8 /plugins/pychrysalide/arch/instructions
parentad1caf61fccd0d74be6ac92c41d83e9b0008ff2b (diff)
Simplified code.
Diffstat (limited to 'plugins/pychrysalide/arch/instructions')
-rw-r--r--plugins/pychrysalide/arch/instructions/raw.c11
-rw-r--r--plugins/pychrysalide/arch/instructions/undefined.c11
2 files changed, 2 insertions, 20 deletions
diff --git a/plugins/pychrysalide/arch/instructions/raw.c b/plugins/pychrysalide/arch/instructions/raw.c
index 10e5c8f..c1366c6 100644
--- a/plugins/pychrysalide/arch/instructions/raw.c
+++ b/plugins/pychrysalide/arch/instructions/raw.c
@@ -146,8 +146,6 @@ static int py_raw_instruction_init(PyObject *self, PyObject *args, PyObject *kwd
unsigned long count; /* Nombre d'éléments à lister */
unsigned int endian; /* Type de boutisme impliqué */
int ret; /* Bilan de lecture des args. */
- PyObject *new_args; /* Nouveaux arguments épurés */
- PyObject *new_kwds; /* Nouveau dictionnaire épuré */
GArchInstruction *fake; /* Instruction à copier */
GArchInstruction *instr; /* Instruction à manipuler */
size_t op_count; /* Nombre d'opérande à copier */
@@ -196,14 +194,7 @@ static int py_raw_instruction_init(PyObject *self, PyObject *args, PyObject *kwd
/* Initialisation d'un objet GLib */
- new_args = PyTuple_New(0);
- new_kwds = PyDict_New();
-
- ret = PyGObject_Type.tp_init(self, new_args, new_kwds);
-
- Py_DECREF(new_kwds);
- Py_DECREF(new_args);
-
+ ret = forward_pygobjet_init(self);
if (ret == -1) goto clean_exit;
/* Eléments de base */
diff --git a/plugins/pychrysalide/arch/instructions/undefined.c b/plugins/pychrysalide/arch/instructions/undefined.c
index 66ae4b6..5741609 100644
--- a/plugins/pychrysalide/arch/instructions/undefined.c
+++ b/plugins/pychrysalide/arch/instructions/undefined.c
@@ -129,8 +129,6 @@ static int py_undef_instruction_init(PyObject *self, PyObject *args, PyObject *k
{
unsigned long behavior; /* Conséquence pour l'instruct°*/
int ret; /* Bilan de lecture des args. */
- PyObject *new_args; /* Nouveaux arguments épurés */
- PyObject *new_kwds; /* Nouveau dictionnaire épuré */
GUndefInstruction *instr; /* Instruction à manipuler */
undef_obj_extra *extra; /* Données insérées à modifier */
@@ -155,14 +153,7 @@ static int py_undef_instruction_init(PyObject *self, PyObject *args, PyObject *k
/* Initialisation d'un objet GLib */
- new_args = PyTuple_New(0);
- new_kwds = PyDict_New();
-
- ret = PyGObject_Type.tp_init(self, new_args, new_kwds);
-
- Py_DECREF(new_kwds);
- Py_DECREF(new_args);
-
+ ret = forward_pygobjet_init(self);
if (ret == -1) return -1;
/* Eléments de base */