From a685482d48addbb37e4bdf1da7db11139b9481dc Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 2 May 2012 20:34:40 +0100 Subject: [PATCH 9/9] Deprecate the slow version of TpIntset iteration --- telepathy-glib/intset.c | 28 +++++++++++++++++++++++++--- telepathy-glib/intset.h | 24 ++++++++++-------------- 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/telepathy-glib/intset.c b/telepathy-glib/intset.c index 72be3dd..f5da30c 100644 --- a/telepathy-glib/intset.c +++ b/telepathy-glib/intset.c @@ -96,6 +96,15 @@ tp_intset_get_type (void) /* (typedef, see header) */ /** + * TpIntSetIter: (skip) + * + * Before 0.11.16, this was the name for TpIntsetIter, but + * it's now just a backwards compatibility typedef. + * + * Deprecated: since 0.UNRELEASED. Use #TpIntsetFastIter instead + */ + +/** * TpIntsetIter: * @set: The set iterated over. * @element: Must be (guint)(-1) before iteration starts. Set to the next @@ -110,6 +119,8 @@ tp_intset_get_type (void) * * Before 0.11.16, this type was called TpIntSetIter, * which is now a backwards compatibility typedef. + * + * Deprecated: since 0.UNRELEASED. Use #TpIntsetFastIter instead */ /* (public, see header) */ @@ -128,9 +139,7 @@ tp_intset_get_type (void) * } * * - * Since 0.11.6, consider using #TpIntsetFastIter if iteration in - * numerical order is not required. - * + * Deprecated: since 0.UNRELEASED. Use #TpIntsetFastIter instead */ /* (macro, see header) */ @@ -140,6 +149,8 @@ tp_intset_get_type (void) * @set: An integer set to be used by that iterator * * Reset the iterator @iter to the beginning and make it iterate over @set. + * + * Deprecated: since 0.UNRELEASED. Use #TpIntsetFastIter instead */ void tp_intset_iter_init ( @@ -157,6 +168,8 @@ tp_intset_iter_init ( * * Reset the iterator @iter to the beginning. It must already be associated * with a set. + * + * Deprecated: since 0.UNRELEASED. Use #TpIntsetFastIter instead */ void tp_intset_iter_reset (TpIntsetIter *iter) @@ -873,6 +886,15 @@ tp_intset_iter_next (TpIntsetIter *iter) } /** + * TpIntSetFastIter: (skip) + * + * Before 0.11.16, this was the name for TpIntsetFastIter, + * but it's now just a backwards compatibility typedef. + * + * Deprecated: since 0.UNRELEASED. Use #TpIntsetFastIter instead + */ + +/** * TpIntsetFastIter: * * An opaque structure representing iteration in undefined order over a set of diff --git a/telepathy-glib/intset.h b/telepathy-glib/intset.h index 36bf0fb..e1ac2e8 100644 --- a/telepathy-glib/intset.h +++ b/telepathy-glib/intset.h @@ -25,6 +25,8 @@ #include +#include + G_BEGIN_DECLS #define TP_TYPE_INTSET (tp_intset_get_type ()) @@ -80,25 +82,25 @@ TpIntset *tp_intset_symmetric_difference (const TpIntset *left, gchar *tp_intset_dump (const TpIntset *set) G_GNUC_WARN_UNUSED_RESULT; +#ifndef TP_DISABLE_DEPRECATED typedef struct { const TpIntset *set; guint element; } TpIntsetIter; -#ifndef TP_DISABLE_DEPRECATED -/** - * TpIntSetIter: (skip) - * - * Before 0.11.16, this was the name for TpIntsetIter, but - * it's now just a backwards compatibility typedef. - */ typedef TpIntsetIter TpIntSetIter; -#endif #define TP_INTSET_ITER_INIT(set) { (set), (guint)(-1) } + +_TP_DEPRECATED_IN_0_20_FOR (tp_intset_fast_iter_init) void tp_intset_iter_init (TpIntsetIter *iter, const TpIntset *set); + +_TP_DEPRECATED_IN_0_20_FOR (tp_intset_fast_iter_init) void tp_intset_iter_reset (TpIntsetIter *iter); + +_TP_DEPRECATED_IN_0_20_FOR (tp_intset_fast_iter_next) gboolean tp_intset_iter_next (TpIntsetIter *iter); +#endif typedef struct { /**/ @@ -106,12 +108,6 @@ typedef struct { } TpIntsetFastIter; #ifndef TP_DISABLE_DEPRECATED -/** - * TpIntSetFastIter: (skip) - * - * Before 0.11.16, this was the name for TpIntsetFastIter, - * but it's now just a backwards compatibility typedef. - */ typedef TpIntsetFastIter TpIntSetFastIter; #endif -- 1.7.10