GNOME Bugzilla – Bug 660524
missing transfer declaration in peas-engine.c
Last modified: 2011-10-05 20:12:38 UTC
The returned plugin_info from peas_engine_get_plugin_info () is unowned. The declaration for introspection on peas_engine_get_plugin_info should say: /** * peas_engine_get_plugin_info: * @engine: A #PeasEngine. * @plugin_name: A plugin name. * * Gets the #PeasPluginInfo corresponding with @plugin_name, * or %NULL if @plugin_name was not found. * * Returns: (transfer none): the #PeasPluginInfo corresponding with * a given plugin module name. */ right now it says: /** * peas_engine_get_plugin_info: * @engine: A #PeasEngine. * @plugin_name: A plugin name. * * Gets the #PeasPluginInfo corresponding with @plugin_name, * or %NULL if @plugin_name was not found. * * Returns: the #PeasPluginInfo corresponding with * a given plugin module name. */ Without the "(transfer none)", GI assumes it is transfer full, afaik. This can cause crashes. Perhaps there are other places in the code where this is relevant.
Created attachment 197829 [details] [review] Annotate PeasPluginInfo return values as transfer none Otherwise GObject-Introspection says that it is transfer full.
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.