[Bug 78744] Port misc CM-side code to gdbus-codegen

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu May 15 07:26:29 PDT 2014


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

--- Comment #2 from Simon McVittie <simon.mcvittie at collabora.co.uk> ---
See also

https://bugs.freedesktop.org/show_bug.cgi?id=77194 (contains partial review of
an earlier version of this branch)
https://bugs.freedesktop.org/show_bug.cgi?id=77197 (likewise)
https://bugs.freedesktop.org/show_bug.cgi?id=29265 (can maybe be closed as a
dup when this is merged?)
https://bugs.freedesktop.org/show_bug.cgi?id=70731 (WiP, partially duplicates
this branch, might be worth skim-reading commits and comments)
https://bugs.freedesktop.org/show_bug.cgi?id=71508 (included in this branch)

I am not particularly happy with the TpPresenceStatusSpec API that I wrote for
Bug #71508, which Xavier has included in this branch. If you can think of
better APIs for dealing with TpPresenceStatusSpec, I'd like to hear them.

I think TpPresenceStatusSpec should perhaps be a GObject - that way, if CMs
want to attach arbitrary misc to it (the names of XMPP statuses or the numeric
values of some enum in libpurple, perhaps), it has qdata with which they can do
that.

(In reply to comment #1)
> I'm not really familiar with the handle repos code so I'd prefer to let smcv
> review those from a high level pov.

Noted.

> Why can't we have (transfer non) vfuncs?

Imagine you're pygobject. You call the Python implementation of a vfunc and get
a Python unicode object (which is in UTF-16 or UCS-4), or a Python list, or
something. You know that what you are required to return to C code is a const
char * in UTF-8, or a GList, or something.

OK, fine, you can encode the unicode object to a string, or make a GList
containing C equivalents of each element of the Python list. But when can you
free that string, or free that GList? The answer is "you can't know" - maybe
the API docs for the C vfunc even say you have to return a string that is valid
forever?

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