diff options
Diffstat (limited to 'plugins/pychrysalide/analysis/loading.c')
-rw-r--r-- | plugins/pychrysalide/analysis/loading.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/plugins/pychrysalide/analysis/loading.c b/plugins/pychrysalide/analysis/loading.c index 0b06bd1..11a9854 100644 --- a/plugins/pychrysalide/analysis/loading.c +++ b/plugins/pychrysalide/analysis/loading.c @@ -79,16 +79,14 @@ static PyObject *py_content_explorer_populate_group(PyObject *self, PyObject *ar { PyObject *result; /* Valeur à retourner */ unsigned long long wid; /* Identifiant de groupe */ - PyObject *content_obj; /* Nouveau contenu Python */ + GBinContent *content; /* Contenu nouveau au final */ int ret; /* Bilan de lecture des args. */ GContentExplorer *explorer; /* Explorateur à manipuler */ - GBinContent *content; /* Contenu nouveau au final */ - ret = PyArg_ParseTuple(args, "KO!", &wid, get_python_binary_content_type(), &content_obj); + ret = PyArg_ParseTuple(args, "KO&", &wid, convert_to_binary_content, &content); if (!ret) return NULL; explorer = G_CONTENT_EXPLORER(pygobject_get(self)); - content = G_BIN_CONTENT(pygobject_get(content_obj)); g_content_explorer_populate_group(explorer, wid, content); @@ -116,16 +114,14 @@ static PyObject *py_content_explorer_note_detected(PyObject *self, PyObject *arg { PyObject *result; /* Valeur à retourner */ unsigned long long wid; /* Identifiant de groupe */ - PyObject *loaded_obj; /* Contenu chargé en Python */ + GLoadedContent *loaded; /* Contenu chargé au final */ int ret; /* Bilan de lecture des args. */ GContentExplorer *explorer; /* Explorateur à manipuler */ - GLoadedContent *loaded; /* Contenu chargé au final */ - ret = PyArg_ParseTuple(args, "KO!", &wid, get_python_loaded_content_type(), &loaded_obj); + ret = PyArg_ParseTuple(args, "KO&", &wid, convert_to_loaded_content, &loaded); if (!ret) return NULL; explorer = G_CONTENT_EXPLORER(pygobject_get(self)); - loaded = G_LOADED_CONTENT(pygobject_get(loaded_obj)); g_content_explorer_note_detected(explorer, wid, loaded); @@ -248,16 +244,14 @@ static PyObject *py_content_resolver_add_detected(PyObject *self, PyObject *args { PyObject *result; /* Valeur à retourner */ unsigned long long wid; /* Identifiant de groupe */ - PyObject *loaded_obj; /* Contenu chargé en Python */ + GLoadedContent *loaded; /* Contenu chargé au final */ int ret; /* Bilan de lecture des args. */ GContentResolver *resolver; /* Résolveur à manipuler */ - GLoadedContent *loaded; /* Contenu chargé au final */ - ret = PyArg_ParseTuple(args, "KO!", &wid, get_python_loaded_content_type(), &loaded_obj); + ret = PyArg_ParseTuple(args, "KO&", &wid, convert_to_loaded_content, &loaded); if (!ret) return NULL; resolver = G_CONTENT_RESOLVER(pygobject_get(self)); - loaded = G_LOADED_CONTENT(pygobject_get(loaded_obj)); g_content_resolver_add_detected(resolver, wid, loaded); |