summaryrefslogtreecommitdiff
path: root/telepathy-glib/account.c
diff options
context:
space:
mode:
Diffstat (limited to 'telepathy-glib/account.c')
-rw-r--r--telepathy-glib/account.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c
index a8034a0f6..8eb3aaf65 100644
--- a/telepathy-glib/account.c
+++ b/telepathy-glib/account.c
@@ -3302,8 +3302,9 @@ _tp_account_got_avatar_cb (TpProxy *proxy,
else
{
avatar = g_value_get_boxed (out_Value);
- res = g_value_get_boxed (g_value_array_get_nth (avatar, 0));
- g_simple_async_result_set_op_res_gpointer (result, res, NULL);
+ res = g_value_dup_boxed (g_value_array_get_nth (avatar, 0));
+ g_simple_async_result_set_op_res_gpointer (result, res,
+ (GDestroyNotify) g_array_unref);
}
g_simple_async_result_complete (result);
@@ -3347,7 +3348,10 @@ tp_account_get_avatar_async (TpAccount *account,
*
* Finishes an async get operation of @account's avatar.
*
- * Returns: (element-type guchar): a #GArray of #guchar
+ * Beware that the returned value is only valid until @result is freed.
+ * Copy it with g_array_ref() if you need to keep it for longer.
+ *
+ * Returns: (element-type guchar) (transfer none): a #GArray of #guchar
* containing the bytes of the account's avatar, or %NULL on failure
*
* Since: 0.9.0
@@ -3774,10 +3778,9 @@ _tp_account_get_storage_specific_information_cb (TpProxy *self,
}
else
{
- GHashTable *info;
-
- info = g_value_get_boxed (value);
- g_simple_async_result_set_op_res_gpointer (result, info, NULL);
+ g_simple_async_result_set_op_res_gpointer (result,
+ g_value_dup_boxed (value),
+ (GDestroyNotify) g_hash_table_unref);
}
g_simple_async_result_complete (result);
@@ -3825,6 +3828,9 @@ tp_account_get_storage_specific_information_async (TpAccount *self,
* Retrieve the value of the request begun with
* tp_account_get_storage_specific_information_async().
*
+ * Beware that the returned value is only valid until @result is freed.
+ * Copy it with g_hash_table_ref() if you need to keep it for longer.
+ *
* Returns: (element-type utf8 GObject.Value) (transfer none): a #GHashTable
* of strings to GValues representing the D-Bus type a{sv}.
*