diff options
Diffstat (limited to 'plugins/pychrysalide/helpers.h')
-rw-r--r-- | plugins/pychrysalide/helpers.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/pychrysalide/helpers.h b/plugins/pychrysalide/helpers.h index e080ca4..bf95e61 100644 --- a/plugins/pychrysalide/helpers.h +++ b/plugins/pychrysalide/helpers.h @@ -25,8 +25,9 @@ #define _PLUGINS_PYCHRYSALIDE_HELPERS_H -#include <glib-object.h> #include <Python.h> +#include <assert.h> +#include <glib-object.h> #include <stdbool.h> @@ -97,13 +98,8 @@ bool _register_class_for_pygobject(PyObject *, GType, PyTypeObject *, PyTypeObje #define register_class_for_pygobject(dict, gtype, type, base) \ _register_class_for_pygobject(dict, gtype, type, base, NULL) - -/** - * Quand on remplace un objet GLib dans le dos de Python, il faut - * le remplacer de la même manière qu'on l'a obtenu ! - */ - -#define pygobject_set(p, v) ((PyGObject *)(p))->obj = (GObject *)v +/* Enregistre un type Python dérivant d'un type GLib dynamique. */ +bool register_class_for_dynamic_pygobject(GType, PyTypeObject *, PyTypeObject *); |