[next] telepathy-glib: Remove deprecated parts of TpIntset
Simon McVittie
smcv at kemper.freedesktop.org
Thu May 3 07:34:43 PDT 2012
Module: telepathy-glib
Branch: next
Commit: 0d11f168ab29486682676e98e3f48e0db8b86240
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=0d11f168ab29486682676e98e3f48e0db8b86240
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Thu May 3 13:51:20 2012 +0100
Remove deprecated parts of TpIntset
---
docs/reference/telepathy-glib-sections.txt | 5 -
telepathy-glib/intset.c | 154 ----------------------------
telepathy-glib/intset.h | 36 -------
tests/intset.c | 24 -----
4 files changed, 0 insertions(+), 219 deletions(-)
diff --git a/docs/reference/telepathy-glib-sections.txt b/docs/reference/telepathy-glib-sections.txt
index efc209c..25937b3 100644
--- a/docs/reference/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib-sections.txt
@@ -1840,11 +1840,6 @@ tp_intset_dump
TpIntsetFastIter
tp_intset_fast_iter_init
tp_intset_fast_iter_next
-TP_INTSET_ITER_INIT
-TpIntsetIter
-tp_intset_iter_init
-tp_intset_iter_next
-tp_intset_iter_reset
<SUBSECTION Standard>
tp_intset_get_type
<SUBSECTION Private>
diff --git a/telepathy-glib/intset.c b/telepathy-glib/intset.c
index f5da30c..86e57a3 100644
--- a/telepathy-glib/intset.c
+++ b/telepathy-glib/intset.c
@@ -73,11 +73,6 @@ tp_intset_get_type (void)
if (G_UNLIKELY (type == 0))
{
- /* The "TpIntSet" type has to be registered for backwards compatibility.
- * The canonical name of the type is now "TpIntset"; see fdo#30134. */
- g_boxed_type_register_static (g_intern_static_string ("TpIntSet"),
- (GBoxedCopyFunc) tp_intset_copy,
- (GBoxedFreeFunc) tp_intset_destroy);
type = g_boxed_type_register_static (g_intern_static_string ("TpIntset"),
(GBoxedCopyFunc) tp_intset_copy,
(GBoxedFreeFunc) tp_intset_destroy);
@@ -96,96 +91,9 @@ 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
- * element in the set by tp_intset_iter_next(); undefined after
- * tp_intset_iter_next() returns %FALSE.
- *
- * A structure representing iteration over a set of integers. Must be
- * initialized with either TP_INTSET_ITER_INIT() or tp_intset_iter_init().
- *
- * Since 0.11.6, consider using #TpIntsetFastIter if iteration in
- * numerical order is not required.
- *
- * 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) */
-
-/**
- * TP_INTSET_ITER_INIT:
- * @set: A set of integers
- *
- * A suitable static initializer for a #TpIntsetIter, to be used as follows:
- *
- * <informalexample><programlisting>
- * void
- * do_something (const TpIntset *intset)
- * {
- * TpIntsetIter iter = TP_INTSET_ITER_INIT (intset);
- * /<!-- -->* ... do something with iter ... *<!-- -->/
- * }
- * </programlisting></informalexample>
- *
- * Deprecated: since 0.UNRELEASED. Use #TpIntsetFastIter instead
- */
-/* (macro, see header) */
-
-/**
- * tp_intset_iter_init:
- * @iter: An integer set iterator to be initialized.
- * @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 (
- TpIntsetIter *iter,
- const TpIntset *set)
-{
- g_return_if_fail (iter != NULL);
- iter->set = set;
- iter->element = (guint)(-1);
-}
-
-/**
- * tp_intset_iter_reset:
- * @iter: An integer set iterator to be reset.
- *
- * 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)
-{
- g_return_if_fail (iter != NULL);
- g_return_if_fail (iter->set != NULL);
- iter->element = (guint)(-1);
-}
-
-/**
* TpIntset:
*
* Opaque type representing a set of unsigned integers.
- *
- * Before 0.11.16, this type was called <type>TpIntSet</type>, which is
- * now a backwards compatibility typedef.
*/
struct _TpIntset
@@ -836,73 +744,11 @@ tp_intset_dump (const TpIntset *set)
}
/**
- * tp_intset_iter_next:
- * @iter: An iterator originally initialized with TP_INTSET_INIT(set)
- *
- * If there are integers in (@iter->set) higher than (@iter->element), set
- * (iter->element) to the next one and return %TRUE. Otherwise return %FALSE.
- *
- * Usage:
- *
- * <informalexample><programlisting>
- * TpIntsetIter iter = TP_INTSET_INIT (intset);
- * while (tp_intset_iter_next (&iter))
- * {
- * printf ("%u is in the intset\n", iter.element);
- * }
- * </programlisting></informalexample>
- *
- * Since 0.11.6, consider using #TpIntsetFastIter if iteration in
- * numerical order is not required.
- *
- * Returns: %TRUE if (@iter->element) has been advanced
- */
-gboolean
-tp_intset_iter_next (TpIntsetIter *iter)
-{
- g_return_val_if_fail (iter != NULL, FALSE);
- g_return_val_if_fail (iter->set != NULL, FALSE);
-
- do
- {
- if (iter->element == (guint)(-1))
- {
- /* only just started */
- iter->element = 0;
- }
- else
- {
- ++iter->element;
- }
-
- if (_tp_intset_is_member (iter->set, iter->element))
- {
- return TRUE;
- }
- }
- while (iter->element < iter->set->largest_ever &&
- iter->element != (guint)(-1));
- return FALSE;
-}
-
-/**
- * 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
* integers. Must be initialized with tp_intset_fast_iter_init().
*
- * Before 0.11.16, this type was called <type>TpIntSetFastIter</type>,
- * which is now a backwards compatibility typedef.
- *
* Usage is similar to #GHashTableIter:
*
* <informalexample><programlisting>
diff --git a/telepathy-glib/intset.h b/telepathy-glib/intset.h
index e1ac2e8..4fcb77f 100644
--- a/telepathy-glib/intset.h
+++ b/telepathy-glib/intset.h
@@ -34,18 +34,6 @@ GType tp_intset_get_type (void);
typedef struct _TpIntset TpIntset;
-#ifndef TP_DISABLE_DEPRECATED
-/* See fdo#30134 for the reasoning behind the rename of TpIntSet to TpIntset */
-
-/**
- * TpIntSet: (skip)
- *
- * Before 0.11.16, this was the name for <type>TpIntset</type>, but it's
- * now just a backwards compatibility typedef.
- */
-typedef TpIntset TpIntSet;
-#endif
-
typedef void (*TpIntFunc) (guint i, gpointer userdata);
TpIntset *tp_intset_new (void) G_GNUC_WARN_UNUSED_RESULT;
@@ -82,35 +70,11 @@ 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;
-
-typedef TpIntsetIter TpIntSetIter;
-
-#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>*/
gpointer _dummy[16];
} TpIntsetFastIter;
-#ifndef TP_DISABLE_DEPRECATED
-typedef TpIntsetFastIter TpIntSetFastIter;
-#endif
-
void tp_intset_fast_iter_init (TpIntsetFastIter *iter,
const TpIntset *set);
diff --git a/tests/intset.c b/tests/intset.c
index f92af36..3af6571 100644
--- a/tests/intset.c
+++ b/tests/intset.c
@@ -5,29 +5,6 @@
#include <telepathy-glib/util.h>
static void
-iterate_in_order (TpIntset *set)
-{
- TpIntsetIter iter;
- guint n = 0;
- gint64 prev = (guint) -1;
-
- tp_intset_iter_init (&iter, set);
-
- while (tp_intset_iter_next (&iter))
- {
- g_assert (tp_intset_is_member (set, iter.element));
-
- if (prev != (guint) -1)
- g_assert_cmpuint (iter.element, >, prev);
-
- prev = iter.element;
- n++;
- }
-
- g_assert_cmpuint (n, ==, tp_intset_size (set));
-}
-
-static void
iterate_fast (TpIntset *set)
{
TpIntsetFastIter iter;
@@ -49,7 +26,6 @@ static void
test_iteration (TpIntset *set)
{
iterate_fast (set);
- iterate_in_order (set);
}
int main (int argc, char **argv)
More information about the telepathy-commits
mailing list