@elextr commented on this pull request.
- g_return_if_fail(ext_name != NULL);
+ + entry = g_malloc(sizeof *entry); + entry->extension = extension; + entry->data = data; + entry->priority = priority; + + all_extensions = g_list_insert_sorted(all_extensions, entry, sort_extension_entries); +} + + +/** + * Plugins are responsible for calling this function when they no longer + * provide the extension, at the latest in the plugin @c cleanup() function. + * + * @param extension The @c PluginExtension structure that is being unregistered.
Ok, so the lifetime of the `PluginExtension` struct has to be at least from register to unregister, and the plugin has to keep the pointer.