summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/analysis/types/proto.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/proto.c
parentf0682e7b195acbd4d83148f3829479d682f9ee9f (diff)
Created more converters for Python arguments.
Diffstat (limited to 'plugins/pychrysalide/analysis/types/proto.c')
-rw-r--r--plugins/pychrysalide/analysis/types/proto.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/pychrysalide/analysis/types/proto.c b/plugins/pychrysalide/analysis/types/proto.c
index a6046ab..975be1e 100644
--- a/plugins/pychrysalide/analysis/types/proto.c
+++ b/plugins/pychrysalide/analysis/types/proto.c
@@ -98,18 +98,15 @@ static PyObject *py_proto_type_new(PyTypeObject *type, PyObject *args, PyObject
static PyObject *py_proto_type_add_arg(PyObject *self, PyObject *args)
{
- PyObject *arg_obj; /* Objet du type d'argument */
- int ret; /* Bilan de lecture des args. */
GDataType *arg; /* Version GLib du type */
+ int ret; /* Bilan de lecture des args. */
GProtoType *type; /* Version GLib du type */
- ret = PyArg_ParseTuple(args, "O!", get_python_data_type_type(), &arg_obj);
+ ret = PyArg_ParseTuple(args, "O&", convert_to_data_type, &arg);
if (!ret) return NULL;
type = G_PROTO_TYPE(pygobject_get(self));
- arg = G_DATA_TYPE(pygobject_get(arg_obj));
-
g_object_ref(G_OBJECT(arg));
g_proto_type_add_arg(type, arg);