[Telepathy] [Bug 18220] Add tp_asv_set_… for types we generally permit in "a{sv}" s.
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Mar 5 02:51:28 PST 2009
http://bugs.freedesktop.org/show_bug.cgi?id=18220
Simon McVittie <simon.mcvittie at collabora.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2009-03-05 02:51:28 PST ---
I think this is fixed in a different way by my 'sliced-woot' branch, which I
just merged. This adds functions like tp_g_value_slice_new_uint, allowing for
this syntax (code copied from one of the tests):
GHashTable *details = g_hash_table_new_full (g_str_hash, g_str_equal,
NULL, (GDestroyNotify) tp_g_value_slice_free);
...
g_hash_table_insert (details, "actor", tp_g_value_slice_new_uint (camel2));
...
g_hash_table_insert (details, "change-reason",
tp_g_value_slice_new_uint (TP_CHANNEL_GROUP_CHANGE_REASON_KICKED));
This avoids the problem that tp_asv_set_foo needs to know how the memory for
the GValue is meant to be allocated (g_slice_new vs. g_malloc), by making it
explicit.
wjt agrees that this is sufficient, so I'm closing this bug.
--
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
mailing list