[Bug 25205] Add a plugin loader to Gabble

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Nov 23 14:13:35 CET 2009


http://bugs.freedesktop.org/show_bug.cgi?id=25205





--- Comment #1 from Simon McVittie <simon.mcvittie at collabora.co.uk>  2009-11-23 05:13:34 PST ---
http://git.collabora.co.uk/?p=user/wjt/telepathy-gabble-wjt.git;a=commitdiff;h=7fea8c47ac64b
> I'm not sure why this is needed: the flags from gmodule's pkg-config
> file include this...

My guess is that it's needed because telepathy-gabble is not directly linked
against GModule (LDADD lists only libgabble-convenience.la).

http://git.collabora.co.uk/?p=user/wjt/telepathy-gabble-wjt.git;a=commitdiff;h=8da13451401
> GabblePluginLoader is a singleton, because it doesn't make sense to have
> more than one plugin loader. It keeps a reference to itself once it's
> instantiated, because it doesn't make sense to destroy it (our modules
> can't be unloaded).

I don't like this: it'll add unnecessary noise to refdbg/valgrind. Would you
mind making it a destroyable singleton, like the session bus returned by
tp_dbus_daemon_dup, instead? That'd mean taking a weak pointer
(g_object_add_weak_pointer) when it gets created, and unreffing it at the end
of gabble_main().

I can see why that would cause difficulties with the approach you use later,
creating the plugin loader lazily. Instantiating plugins lazily means that it's
unpredictable when g_module_check_init will be called, but perhaps we don't
want plugins to put side-effects in that function anyway...


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the telepathy-bugs mailing list