diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-01-03 23:36:47 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-01-03 23:36:47 (GMT) |
commit | 55ccf25e0c6666436f0ecd222e60208ebf6ab30e (patch) | |
tree | 21c1ecc9e6d6ae50d0cfb0ffa4eaf61bf78a45a2 /plugins/pychrysalide/helpers.h | |
parent | 28bfc34862513acb8fe9fcd02afca493c2411c02 (diff) |
Defined a dynamic type for each plugin.
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 *); |