[next] telepathy-glib: Deprecate the slow version of TpIntset iteration
Simon McVittie
smcv at kemper.freedesktop.org
Thu May 3 05:47:00 PDT 2012
Module: telepathy-glib
Branch: next
Commit: a685482d48addbb37e4bdf1da7db11139b9481dc
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=a685482d48addbb37e4bdf1da7db11139b9481dc
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Wed May 2 20:34:40 2012 +0100
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 <type>TpIntsetIter</type>, 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 <type>TpIntSetIter</type>,
* 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)
* }
* </programlisting></informalexample>
*
- * 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 <type>TpIntsetFastIter</type>,
+ * 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 <glib-object.h>
+#include <telepathy-glib/defs.h>
+
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 <type>TpIntsetIter</type>, 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 {
/*<private>*/
@@ -106,12 +108,6 @@ typedef struct {
} TpIntsetFastIter;
#ifndef TP_DISABLE_DEPRECATED
-/**
- * TpIntSetFastIter: (skip)
- *
- * Before 0.11.16, this was the name for <type>TpIntsetFastIter</type>,
- * but it's now just a backwards compatibility typedef.
- */
typedef TpIntsetFastIter TpIntSetFastIter;
#endif
More information about the telepathy-commits
mailing list