summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/helpers.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2023-05-22 20:56:32 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2023-05-22 20:56:32 (GMT)
commite1a2823b5d831349467d309ce42d56055ec9c04f (patch)
treebc4dd464d10cd379622ceb361398895d59849409 /plugins/pychrysalide/helpers.h
parent15fb909bdd8ca0f37dd71da7427ea6bc6bb71cbb (diff)
Rely on GObject-introspection implementation for some registrations.
Diffstat (limited to 'plugins/pychrysalide/helpers.h')
-rw-r--r--plugins/pychrysalide/helpers.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/plugins/pychrysalide/helpers.h b/plugins/pychrysalide/helpers.h
index c9cc098..962de74 100644
--- a/plugins/pychrysalide/helpers.h
+++ b/plugins/pychrysalide/helpers.h
@@ -156,10 +156,10 @@ bool register_python_module_object(PyObject *, PyTypeObject *);
/* Accompagne la création d'une instance dérivée en Python. */
-PyObject *python_constructor_with_dynamic_gtype(PyTypeObject *, PyObject *, PyObject *, PyTypeObject *, GType);
+PyObject *python_constructor_with_dynamic_gtype(PyTypeObject *, GType, PyObject *, PyObject *);
/* Accompagne la création d'une instance dérivée en Python. */
-PyObject *python_abstract_constructor_with_dynamic_gtype(PyTypeObject *, PyObject *, PyObject *, PyTypeObject *, GType, GClassInitFunc);
+PyObject *python_abstract_constructor_with_dynamic_gtype(PyTypeObject *, GType, GClassInitFunc, PyObject *, PyObject *);
#define CREATE_DYN_CONSTRUCTOR(pyname, gbase) \
@@ -167,9 +167,7 @@ static PyObject *py_ ## pyname ## _new(PyTypeObject *, PyObject *, PyObject *);
static PyObject *py_ ## pyname ## _new(PyTypeObject *type, PyObject *args, PyObject *kwds) \
{ \
PyObject *result; /* Objet à retourner */ \
- PyTypeObject *base; /* Type de base à dériver */ \
- base = get_python_ ## pyname ## _type(); \
- result = python_constructor_with_dynamic_gtype(type, args, kwds, base, gbase); \
+ result = python_constructor_with_dynamic_gtype(type, gbase, args, kwds); \
return result; \
}
@@ -179,10 +177,8 @@ static PyObject *py_ ## pyname ## _new(PyTypeObject *, PyObject *, PyObject *);
static PyObject *py_ ## pyname ## _new(PyTypeObject *type, PyObject *args, PyObject *kwds) \
{ \
PyObject *result; /* Objet à retourner */ \
- PyTypeObject *base; /* Type de base à dériver */ \
- base = get_python_ ## pyname ## _type(); \
- result = python_abstract_constructor_with_dynamic_gtype(type, args, kwds, \
- base, gbase, (GClassInitFunc)cinit); \
+ result = python_abstract_constructor_with_dynamic_gtype(type, gbase, (GClassInitFunc)cinit, \
+ args, kwds); \
return result; \
}
@@ -229,16 +225,13 @@ PyTypeObject *define_python_dynamic_type(const PyTypeObject *);
/* Enregistre correctement une surcouche de conversion GObject. */
-bool _register_class_for_pygobject(PyObject *, GType, PyTypeObject *, PyTypeObject *, ...);
-
-#define register_class_for_pygobject(dict, gtype, type, base) \
- _register_class_for_pygobject(dict, gtype, type, base, NULL)
+bool register_class_for_pygobject(PyObject *, GType, PyTypeObject *);
/* Enregistre correctement une interface GObject pour Python. */
bool register_interface_for_pygobject(PyObject *, GType, PyTypeObject *, const GInterfaceInfo *);
/* Enregistre un type Python dérivant d'un type GLib dynamique. */
-bool register_class_for_dynamic_pygobject(GType, PyTypeObject *, PyTypeObject *);
+bool register_class_for_dynamic_pygobject(GType, PyTypeObject *);
/* Fait suivre à la partie GObject une initialisation nouvelle. */
int forward_pygobjet_init(PyObject *);