[Bug 77772] [next] TpBaseContactList GInterfaces: take vfunc arguments of the appropriate type

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri May 16 05:15:33 PDT 2014


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

--- Comment #4 from Simon McVittie <simon.mcvittie at collabora.co.uk> ---
(In reply to comment #3)
> Simon: can you please take a quick look on
> http://cgit.collabora.com/git/user/cassidy/telepathy-glib/log/?h=next-
> contact-list-iface-77772 and check if this is going into the right direction?

Yes, this is the right direction.

> As you can see in the top commit, doing this means duplicating a bit of
> generic functions and typedef but I don't see any another option.

Agreed.

> Also, should method like "GStrv tp_base_contact_list_dup_groups
> (TpBaseContactList *self);" be changed to take a TpContactGroupList as first
> argument? This methods assert that the iface is implemented so I guess that
> would be ok. But for example tp_base_contact_list_normalize_group() just
> return FALSE in that case.

Oh, I'd forgotten there were functions like that. I must have thought I was
being so clever while designing those interfaces :-(

For the methods where it's considered to be a programming error to call them on
the wrong type, it is correct to change the first argument.

For the methods where calling them on the wrong type is allowed ... I think we
should probably change the semantics to "it's a programming error to call it on
the wrong type" (g_return_if_fail), and move the graceful type-check into the
callers. A bit of "git grep" will be necessary.

-- 
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