Summary: | Add tp_asv_set_… for types we generally permit in "a{sv}"s. | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Will Thompson <will> |
Component: | tp-glib | Assignee: | Telepathy bugs list <telepathy-bugs> |
Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Will Thompson
2008-10-25 03:16:14 UTC
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. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.