summaryrefslogtreecommitdiff
path: root/telepathy-glib/intset.c
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2011-04-19 17:06:40 +0100
committerWill Thompson <will.thompson@collabora.co.uk>2011-04-20 17:45:52 +0100
commit1d78f4a9fb520ec024d0b2cb7fc9eca5babdb5ce (patch)
tree5b61db0de0455b7ff8d6c02cc6468256c9064548 /telepathy-glib/intset.c
parent86e7d89052ef4cd7dd3b47d2f3274b2c16cca06f (diff)
downloadtelepathy-glib-1d78f4a9fb520ec024d0b2cb7fc9eca5babdb5ce.tar.gz
tp_intset_iter_{init,reset}: demacroify
Previously, tp_intset_iter_init (resp. _reset) was a macro, which was implemented using tp_intset_iter_init_inline, which was a static inline function defined in the header. This seems unnecessary, particularly for an iterator type documented to be slow and old and semi-deprecated in favour of the faster variant, which uses a regular function to init.
Diffstat (limited to 'telepathy-glib/intset.c')
-rw-r--r--telepathy-glib/intset.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/telepathy-glib/intset.c b/telepathy-glib/intset.c
index 025e5221c..5546fe91c 100644
--- a/telepathy-glib/intset.c
+++ b/telepathy-glib/intset.c
@@ -139,7 +139,15 @@ tp_intset_get_type (void)
*
* Reset the iterator @iter to the beginning and make it iterate over @set.
*/
-/* (inline, see header) */
+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:
@@ -148,7 +156,13 @@ tp_intset_get_type (void)
* Reset the iterator @iter to the beginning. It must already be associated
* with a set.
*/
-/* (inline, see header) */
+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: