diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-07-14 13:09:58 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-07-14 13:09:58 (GMT) |
commit | ce1baffaf5917431602a6967f8df99a183b3f1c3 (patch) | |
tree | 396468ab1dc90d769bb6a61389e4fd0265c3d568 /plugins/pychrysalide/helpers.c | |
parent | 6c751d40ab1b84a6979c143ed47702207edebed8 (diff) |
Switched to the new interface registration for Python bindings.
Diffstat (limited to 'plugins/pychrysalide/helpers.c')
-rw-r--r-- | plugins/pychrysalide/helpers.c | 45 |
1 files changed, 1 insertions, 44 deletions
diff --git a/plugins/pychrysalide/helpers.c b/plugins/pychrysalide/helpers.c index 3cd528e..1e83ac7 100644 --- a/plugins/pychrysalide/helpers.c +++ b/plugins/pychrysalide/helpers.c @@ -909,50 +909,7 @@ bool _register_class_for_pygobject(PyObject *dict, GType gtype, PyTypeObject *ty * * ******************************************************************************/ -bool register_interface_for_pygobject(PyObject *dict, GType gtype, PyTypeObject *type) -{ - bool result; /* Bilan à retourner */ - char *name; /* Désignation de la classe */ - - assert(gtype != G_TYPE_INVALID); - - name = strrchr(type->tp_name, '.'); - assert(name != NULL); - - name++; - - pyg_register_interface(dict, name, gtype, type); - - if (startswith(type->tp_name, "pychrysalide.")) - { - define_auto_documentation(type); - - result = include_python_type_into_features(dict, type); - - } - else - result = true; - - return result; - -} - - -/****************************************************************************** -* * -* Paramètres : dict = dictionnaire où conserver une référence au type créé.* -* gtype = type dans sa version GLib. * -* type = type dans sa version Python. * -* * -* Description : Enregistre correctement une interface GObject pour Python. * -* * -* Retour : Bilan de l'opération. * -* * -* Remarques : - * -* * -******************************************************************************/ - -bool register_interface_for_pygobject_2(PyObject *dict, GType gtype, PyTypeObject *type, const GInterfaceInfo *info) +bool register_interface_for_pygobject(PyObject *dict, GType gtype, PyTypeObject *type, const GInterfaceInfo *info) { bool result; /* Bilan à retourner */ char *name; /* Désignation de la classe */ |