[Bug 51441] [next] replace TpBase*Class::interfaces by TpBase*Class::get_interfaces

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jul 5 09:39:20 CEST 2012


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

--- Comment #2 from Xavier Claessens <xclaesse at gmail.com> 2012-07-05 07:39:20 UTC ---
(In reply to comment #1)
> Okay I worked on this in master. Once merged, I'll remove all the old stuff in
> next.

Perfect!

> (In reply to comment #0)
> > TpBaseRoomConfig and
> 
> This doesn't actually need this? I did fix a comment referring to
> TpBaseChannel.interfaces though.

True

> > TpBaseProtocol.
> 
> This already has a get_interfaces() which returns a newly-allocated GStrv (why,
> I wonder?) This makes is harder to chain-up. Do you think another
> get_interfaces_array (which uses a GPtrArray) should be added for master, then
> renamed in next?

Yeah, this one is sad... I would vote for doing get_interfaces_array() in
master and rename it in next.

I would also use _TP_SEAL(interfaces) to make them easily catchable at build
time, but that means they need to be out of the doc, see
http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=e8f9a27a388e2123a3281d610acbcd6a4b17d9a1

tp_base_connection_add_interfaces():
doing a g_strv_length() to set the size of the array is totally overkill IMO.
It means you iterate the array twice with probably no benefit since GArray
already pre-allocate more than needed. We are not dealing with hundred of
ifaces here, GArray's minimum allocation is already 8 elements, we probably
will never have more ifaces than that anyway.

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



More information about the telepathy-bugs mailing list