[Bug 14540] Names interface - Aliasing replacement with separate nickname, local alias etc.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jan 3 20:39:02 CET 2013


https://bugs.freedesktop.org/show_bug.cgi?id=14540

--- Comment #37 from Simon McVittie <simon.mcvittie at collabora.co.uk> ---
(In reply to comment #35)
> 3) About tp_names_mixin_init(): I had the idea of adding a
> TpNamesMixinPrivate* in TpBaseConnectionPrivate struct. This wast 64bits per
> connection on CM that don't have aliases (big deal...) and simplify all
> those offset/quark weirdness.

... at the cost of having a conceptual circular dependency: TpBaseConnection
has to know (a small amount) about every mixin it supports. Hanging qdata off
the TpBaseConnection seems cleaner to me, tbh.

(The resulting API is pretty similar, though.)

> tp_names_mixin_finalize(TpBaseConnection *self)

When would a high-level language call this? Python's __del__ special method,
and similar mechanisms, are generally best avoided.

Hanging some qdata off the TpBaseConnection has the advantage that
g_object_finalize() will automatically call its GDestroyNotify.

Another possible pattern, if you don't mind conceptual circular dependencies,
would be for tp_base_connection_finalize (and dispose, if that's needed) to
finalize the known mixins.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.



More information about the telepathy-bugs mailing list