20 Star 0 Fork 13

openEuler-RISC-V/folks

forked from src-openEuler/folks 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
add-missing-generic-type-argument.patch 3.00 KB
一键复制 编辑 原始数据 按行查看 历史
misaka00251 提交于 2022-03-19 09:27 . Upgrade package version & patches
From c44d8e323affd7f1043f300f3325b358cd5b5f0b Mon Sep 17 00:00:00 2001
From: Rico Tzschichholz <ricotz@ubuntu.com>
Date: Sun, 30 Jan 2022 19:42:32 +0100
Subject: [PATCH] folks-generics: Add missing generic type argument
---
folks/folks-generics.vapi | 2 +-
folks/small-set.c | 15 ++++-----------
folks/small-set.h | 5 ++++-
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,
--
GitLab
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openeuler-risc-v/folks.git
git@gitee.com:openeuler-risc-v/folks.git
openeuler-risc-v
folks
folks
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385