summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2022-01-30 19:42:32 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2022-01-30 19:42:32 +0100
commitc44d8e323affd7f1043f300f3325b358cd5b5f0b (patch)
treef6a8ab83a02426e44a3a8f83639affb5d15d083e
parent2b4e272369069eea2ecaa375f472a20087477424 (diff)
downloadfolks-c44d8e323affd7f1043f300f3325b358cd5b5f0b.tar.gz
folks-generics: Add missing generic type argument
-rw-r--r--folks/folks-generics.vapi2
-rw-r--r--folks/small-set.c15
-rw-r--r--folks/small-set.h5
3 files changed, 9 insertions, 13 deletions
diff --git a/folks/folks-generics.vapi b/folks/folks-generics.vapi
index 389025b6..c8a06e96 100644
--- a/folks/folks-generics.vapi
+++ b/folks/folks-generics.vapi
@@ -37,7 +37,7 @@ namespace Folks
internal SmallSet (owned Gee.HashDataFunc<G>? item_hash = null,
owned Gee.EqualDataFunc<G>? item_equals = null);
- internal static SmallSet<G> copy (Gee.Iterable<G> iterable,
+ internal static SmallSet<G> copy<G> (Gee.Iterable<G> iterable,
owned Gee.HashDataFunc<G>? item_hash = null,
owned Gee.EqualDataFunc<G>? item_equals = null);
diff --git a/folks/small-set.c b/folks/small-set.c
index b5a19683..39790755 100644
--- a/folks/small-set.c
+++ b/folks/small-set.c
@@ -337,7 +337,10 @@ _folks_small_set_new_take_array (GPtrArray *arr,
* Returns: (transfer full):
*/
FolksSmallSet *
-folks_small_set_copy (GeeIterable *iterable,
+folks_small_set_copy (GType item_type,
+ GBoxedCopyFunc item_dup,
+ GDestroyNotify item_free,
+ GeeIterable *iterable,
GeeHashDataFunc item_hash,
gpointer item_hash_data,
GDestroyNotify item_hash_data_free,
@@ -347,10 +350,6 @@ folks_small_set_copy (GeeIterable *iterable,
{
FolksSmallSet *self;
GeeIterator *iter;
- GeeTraversableIface *traversable_iface;
- GType item_type;
- GBoxedCopyFunc item_dup;
- GDestroyNotify item_free;
/* Deliberately not allowing for subclasses here: this class is not
* subclassable, and it's slower if we do check for subclasses. */
@@ -376,12 +375,6 @@ folks_small_set_copy (GeeIterable *iterable,
return self;
}
- traversable_iface = GEE_TRAVERSABLE_GET_INTERFACE (iterable);
- g_assert (traversable_iface != NULL);
- item_type = traversable_iface->get_g_type ((GeeTraversable *) iterable);
- item_dup = traversable_iface->get_g_dup_func ((GeeTraversable *) iterable);
- item_free = traversable_iface->get_g_destroy_func ((GeeTraversable *) iterable);
-
self = folks_small_set_new (item_type, item_dup, item_free,
item_hash, item_hash_data, item_hash_data_free,
item_equals, item_equals_data, item_equals_data_free);
diff --git a/folks/small-set.h b/folks/small-set.h
index e61f387e..5df54ce3 100644
--- a/folks/small-set.h
+++ b/folks/small-set.h
@@ -68,7 +68,10 @@ folks_small_set_empty (GType item_type,
GBoxedCopyFunc item_dup,
GDestroyNotify item_free);
-FolksSmallSet *folks_small_set_copy (GeeIterable *iterable,
+FolksSmallSet *folks_small_set_copy (GType item_type,
+ GBoxedCopyFunc item_dup,
+ GDestroyNotify item_free,
+ GeeIterable *iterable,
GeeHashDataFunc item_hash,
gpointer item_hash_data,
GDestroyNotify item_hash_data_free,