diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-05-19 22:44:44 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-05-19 22:44:44 (GMT) |
commit | 5dd935b27a765177960bdfe4d2fcb296cbbd41da (patch) | |
tree | cbf871ec6a2c98a2171a4be716931b2275ef3148 /plugins/pychrysalide/arch | |
parent | 5d09d85a5e606e5ac458abd37e72b73ce52541cb (diff) |
Simplified the code by using existing helpers.h
Diffstat (limited to 'plugins/pychrysalide/arch')
-rw-r--r-- | plugins/pychrysalide/arch/instruction.c | 8 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/processor.c | 8 |
2 files changed, 2 insertions, 14 deletions
diff --git a/plugins/pychrysalide/arch/instruction.c b/plugins/pychrysalide/arch/instruction.c index a8ce3ab..058106d 100644 --- a/plugins/pychrysalide/arch/instruction.c +++ b/plugins/pychrysalide/arch/instruction.c @@ -379,7 +379,6 @@ static int py_arch_instruction_init(PyObject *self, PyObject *args, PyObject *kw unsigned short int uid; /* Indentifiant unique de type */ const char *keyword; /* Désignation d'instruction */ int ret; /* Bilan de lecture des args. */ - PyObject *new_kwds; /* Nouveau dictionnaire épuré */ GPyArchInstruction *instr; /* Instruction à manipuler */ static char *kwlist[] = { "uid", "keyword", NULL }; @@ -391,12 +390,7 @@ static int py_arch_instruction_init(PyObject *self, PyObject *args, PyObject *kw /* Initialisation d'un objet GLib */ - new_kwds = PyDict_New(); - - ret = PyGObject_Type.tp_init(self, args, new_kwds); - - Py_DECREF(new_kwds); - + ret = forward_pygobjet_init(self); if (ret == -1) return -1; /* Eléments de base */ diff --git a/plugins/pychrysalide/arch/processor.c b/plugins/pychrysalide/arch/processor.c index 71ef153..bd1b521 100644 --- a/plugins/pychrysalide/arch/processor.c +++ b/plugins/pychrysalide/arch/processor.c @@ -278,7 +278,6 @@ static int py_arch_processor_init(PyObject *self, PyObject *args, PyObject *kwds { unsigned int endianness; /* Boutisme du processeur */ int ret; /* Bilan de lecture des args. */ - PyObject *new_kwds; /* Nouveau dictionnaire épuré */ GArchProcessor *proc; /* Processeur à manipuler */ static char *kwlist[] = { "endianness", NULL }; @@ -313,12 +312,7 @@ static int py_arch_processor_init(PyObject *self, PyObject *args, PyObject *kwds /* Initialisation d'un objet GLib */ - new_kwds = PyDict_New(); - - ret = PyGObject_Type.tp_init(self, args, new_kwds); - - Py_DECREF(new_kwds); - + ret = forward_pygobjet_init(self); if (ret == -1) return -1; /* Eléments de base */ |