summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/analysis/types/template.c
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/pychrysalide/analysis/types/template.c
parentf0682e7b195acbd4d83148f3829479d682f9ee9f (diff)
Created more converters for Python arguments.
Diffstat (limited to 'plugins/pychrysalide/analysis/types/template.c')
-rw-r--r--plugins/pychrysalide/analysis/types/template.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/pychrysalide/analysis/types/template.c b/plugins/pychrysalide/analysis/types/template.c
index 485eca4..0f6c002 100644
--- a/plugins/pychrysalide/analysis/types/template.c
+++ b/plugins/pychrysalide/analysis/types/template.c
@@ -99,18 +99,15 @@ static PyObject *py_template_type_new(PyTypeObject *type, PyObject *args, PyObje
static PyObject *py_template_type_add_param(PyObject *self, PyObject *args)
{
- PyObject *param_obj; /* Objet du type de paramètre */
- int ret; /* Bilan de lecture des args. */
GDataType *param; /* Version GLib du type */
+ int ret; /* Bilan de lecture des args. */
GTemplateType *type; /* Version GLib du type */
- ret = PyArg_ParseTuple(args, "O!", get_python_data_type_type(), &param_obj);
+ ret = PyArg_ParseTuple(args, "O&", convert_to_data_type, &param);
if (!ret) return NULL;
type = G_TEMPLATE_TYPE(pygobject_get(self));
- param = G_DATA_TYPE(pygobject_get(param_obj));
-
g_object_ref(G_OBJECT(param));
g_template_type_add_param(type, param);