diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-09-26 15:05:04 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-09-26 16:30:48 +0100 |
commit | b8b0af6611ffabc84ad992697e2ae6c87e3483d8 (patch) | |
tree | 3f44de3b074815ea512604bf265f16e443161cdc /telepathy-glib/util.h | |
parent | aa407653e274480ae63b21017869e07de3a1aa4e (diff) | |
download | telepathy-glib-b8b0af6611ffabc84ad992697e2ae6c87e3483d8.tar.gz |
tp_value_array_free: add
This lets connection managers and other Telepathy modules free the
result of tp_value_array_build() without deprecation warnings.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69849
Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
Diffstat (limited to 'telepathy-glib/util.h')
-rw-r--r-- | telepathy-glib/util.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/telepathy-glib/util.h b/telepathy-glib/util.h index 5c5b9a036..9492070bd 100644 --- a/telepathy-glib/util.h +++ b/telepathy-glib/util.h @@ -117,6 +117,23 @@ void tp_value_array_unpack (GValueArray *array, gsize len, ...); +/* Work around GLib having deprecated something that is part of our API. */ +_TP_AVAILABLE_IN_UNRELEASED +void tp_value_array_free (GValueArray *va); +/* this is effectively _TP_AVAILABLE_IN_UNRELEASED too */ +#if TP_VERSION_MAX_ALLOWED >= _TP_VERSION_CUR_STABLE +#define tp_value_array_free(va) _tp_value_array_free_inline (va) +#ifndef __GTK_DOC_IGNORE__ /* gtk-doc can't parse this */ +static inline void +_tp_value_array_free_inline (GValueArray *va) +{ + G_GNUC_BEGIN_IGNORE_DEPRECATIONS + g_value_array_free (va); + G_GNUC_END_IGNORE_DEPRECATIONS +} +#endif +#endif + /* See https://bugzilla.gnome.org/show_bug.cgi?id=680813 for glib inclusion */ typedef struct _TpWeakRef TpWeakRef; TpWeakRef *tp_weak_ref_new (gpointer object, |