diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-07-23 18:57:49 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-07-23 19:01:46 (GMT) |
commit | abefe01dd260cddbd253ba0c03d9c903138c71c1 (patch) | |
tree | 834f683e79893534324af94c537984542b7dc00a /plugins/pychrysalide/pychrysa.c | |
parent | 50eb8c462e7ad2b4e5b82d27b1af6e86091ea272 (diff) |
Tracked the reference counter for plugins with more care.
Diffstat (limited to 'plugins/pychrysalide/pychrysa.c')
-rw-r--r-- | plugins/pychrysalide/pychrysa.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/pychrysalide/pychrysa.c b/plugins/pychrysalide/pychrysa.c index 4e522e5..c1fdd6f 100644 --- a/plugins/pychrysalide/pychrysa.c +++ b/plugins/pychrysalide/pychrysa.c @@ -59,7 +59,8 @@ -DEFINE_CHRYSALIDE_ACTIVE_PLUGIN("PyChrysalide", "Provides bindings to Python", "0.1.0", PGA_PLUGIN_INIT); +DEFINE_CHRYSALIDE_CONTAINER_PLUGIN("PyChrysalide", "Provides bindings to Python", "0.1.0", + EMPTY_PG_LIST(.required), AL(PGA_PLUGIN_INIT, PGA_PLUGIN_EXIT)); /* Note la nature du chargement */ @@ -402,6 +403,8 @@ PyMODINIT_FUNC PyInit_pychrysalide(void) load_remaning_plugins(); + g_object_unref(G_OBJECT(self)); + } return result; @@ -488,7 +491,15 @@ static bool load_python_plugins(GPluginModule *plugin) g_plugin_module_log_variadic_message(plugin, LMT_PROCESS, _("Loaded the Python plugin found in the '<b>%s</b>' directory"), filename); + + /** + * Comme le greffon n'est pas passé par la résolution des dépendances, + * on simule l'effet attendu. + */ + g_object_ref(G_OBJECT(plugin)); + _register_plugin(pyplugin); + } free(filename); |