summaryrefslogtreecommitdiff
path: root/plugins/elf
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-07-21 20:21:59 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-07-21 20:21:59 (GMT)
commit6a8385724c74b07cf9ed4cb9052f1af1816e3ea5 (patch)
treea7bea8a4bb9c816da77cf5c3dd44fbd8fb89b3a7 /plugins/elf
parentf0682e7b195acbd4d83148f3829479d682f9ee9f (diff)
Created more converters for Python arguments.
Diffstat (limited to 'plugins/elf')
-rw-r--r--plugins/elf/python/format.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/elf/python/format.c b/plugins/elf/python/format.c
index b78dadb..277d0b4 100644
--- a/plugins/elf/python/format.c
+++ b/plugins/elf/python/format.c
@@ -71,16 +71,13 @@ static PyObject *py_elf_format_get_header(PyObject *, PyObject *);
static PyObject *py_elf_format_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
PyObject *result; /* Instance à retourner */
- PyObject *content_obj; /* Objet pour le contenu */
- int ret; /* Bilan de lecture des args. */
GBinContent *content; /* Instance GLib du contenu */
+ int ret; /* Bilan de lecture des args. */
GExeFormat *format; /* Création GLib à transmettre */
- ret = PyArg_ParseTuple(args, "O!", get_python_binary_content_type(), &content_obj);
+ ret = PyArg_ParseTuple(args, "O&", convert_to_binary_content, &content);
if (!ret) return NULL;
- content = G_BIN_CONTENT(pygobject_get(content_obj));
-
format = g_elf_format_new(content);
if (format == NULL)