diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-07-21 20:21:59 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-07-21 20:21:59 (GMT) |
commit | 6a8385724c74b07cf9ed4cb9052f1af1816e3ea5 (patch) | |
tree | a7bea8a4bb9c816da77cf5c3dd44fbd8fb89b3a7 /plugins/pychrysalide/analysis/contents | |
parent | f0682e7b195acbd4d83148f3829479d682f9ee9f (diff) |
Created more converters for Python arguments.
Diffstat (limited to 'plugins/pychrysalide/analysis/contents')
-rw-r--r-- | plugins/pychrysalide/analysis/contents/encapsulated.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/plugins/pychrysalide/analysis/contents/encapsulated.c b/plugins/pychrysalide/analysis/contents/encapsulated.c index 7af79e8..031c49f 100644 --- a/plugins/pychrysalide/analysis/contents/encapsulated.c +++ b/plugins/pychrysalide/analysis/contents/encapsulated.c @@ -59,23 +59,18 @@ static PyObject *py_encaps_content_new(PyTypeObject *, PyObject *, PyObject *); static PyObject *py_encaps_content_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PyObject *result; /* Instance à retourner */ - PyObject *base_obj; /* Base en Python */ - const char *path; /* Chemin vers le contenu final*/ - PyObject *endpoint_obj; /* Contenu final en Python */ - int ret; /* Bilan de lecture des args. */ GBinContent *base; /* Base de l'extraction */ + const char *path; /* Chemin vers le contenu final*/ GBinContent *endpoint; /* Contenu accessible au final */ + int ret; /* Bilan de lecture des args. */ GBinContent *content; /* Version GLib du contenu */ - ret = PyArg_ParseTuple(args, "O!sO!", - get_python_binary_content_type(), &base_obj, + ret = PyArg_ParseTuple(args, "O&sO&", + convert_to_binary_content, &base, &path, - get_python_binary_content_type(), &endpoint_obj); + convert_to_binary_content, &endpoint); if (!ret) return NULL; - base = G_BIN_CONTENT(pygobject_get(base_obj)); - endpoint = G_BIN_CONTENT(pygobject_get(endpoint_obj)); - content = g_encaps_content_new(base, path, endpoint); result = pygobject_new(G_OBJECT(content)); |