[folks/folks-0-10] core: Implement more vfuncs in FolksSmallSet
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks/folks-0-10] core: Implement more vfuncs in FolksSmallSet
- Date: Thu, 22 Jan 2015 16:44:20 +0000 (UTC)
commit 6365ee134d0de4aeb74ee70b207ad1c8accdf359
Author: Philip Withnall <philip withnall collabora co uk>
Date: Thu Jan 22 16:14:55 2015 +0000
core: Implement more vfuncs in FolksSmallSet
Implement the generic type vfuncs, which are needed for some of the
search code.
folks/small-set.c | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/folks/small-set.c b/folks/small-set.c
index 09fe77a..93bc472 100644
--- a/folks/small-set.c
+++ b/folks/small-set.c
@@ -462,6 +462,30 @@ folks_small_set_finalize (GObject *obj)
((GObjectClass *) folks_small_set_parent_class)->finalize (obj);
}
+static GType
+folks_small_set_get_g_type (GeeTraversable *traversable)
+{
+ FolksSmallSet *self = FOLKS_SMALL_SET (traversable);
+
+ return self->item_type;
+}
+
+static GBoxedCopyFunc
+folks_small_set_get_g_dup_func (GeeTraversable *traversable)
+{
+ FolksSmallSet *self = FOLKS_SMALL_SET (traversable);
+
+ return self->item_dup;
+}
+
+static GDestroyNotify
+folks_small_set_get_g_destroy_func (GeeTraversable *traversable)
+{
+ FolksSmallSet *self = FOLKS_SMALL_SET (traversable);
+
+ return self->item_free;
+}
+
/*
* Call @f for each element, until it returns %FALSE.
*
@@ -495,6 +519,9 @@ folks_small_set_foreach (GeeTraversable *traversable,
static void
traversable_iface_init (GeeTraversableIface *iface)
{
+ iface->get_g_type = folks_small_set_get_g_type;
+ iface->get_g_dup_func = folks_small_set_get_g_dup_func;
+ iface->get_g_destroy_func = folks_small_set_get_g_destroy_func;
iface->foreach = folks_small_set_foreach;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]