[Bf-blender-cvs] [aeefe651716] sculpt-dev: sculpt-dev: fix compile errors
Joseph Eagar
noreply at git.blender.org
Sat Dec 3 12:27:05 CET 2022
Commit: aeefe651716f0fec059f8ff1b228ece76ead018b
Author: Joseph Eagar
Date: Fri Dec 2 12:35:34 2022 -0800
Branches: sculpt-dev
https://developer.blender.org/rBaeefe651716f0fec059f8ff1b228ece76ead018b
sculpt-dev: fix compile errors
===================================================================
M release/scripts/addons
M source/blender/blenlib/intern/BLI_table_gset.c
M source/blender/blenlib/intern/smallhash.c
===================================================================
diff --git a/release/scripts/addons b/release/scripts/addons
index c226f867aff..5a818af9508 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit c226f867affd12881533a54c8c90ac6eebfaca6c
+Subproject commit 5a818af95080cccf04dfa8317f0e966bff515c64
diff --git a/source/blender/blenlib/intern/BLI_table_gset.c b/source/blender/blenlib/intern/BLI_table_gset.c
index 90c1235072e..88e3cc133b1 100644
--- a/source/blender/blenlib/intern/BLI_table_gset.c
+++ b/source/blender/blenlib/intern/BLI_table_gset.c
@@ -100,7 +100,7 @@ bool BLI_table_gset_add(TableGSet *ts, void *elem)
bool ret = BLI_smallhash_ensure_p(PTR_TO_IDX(ts), (uintptr_t)elem, &val);
if (!ret) {
- *val = ts->cur;
+ *val = POINTER_FROM_INT(ts->cur);
ts->elems[ts->cur++] = elem;
ts->length++;
@@ -113,7 +113,7 @@ void BLI_table_gset_insert(TableGSet *ts, void *elem)
{
table_gset_resize(ts);
- BLI_smallhash_insert(PTR_TO_IDX(ts), elem, (void *)ts->cur);
+ BLI_smallhash_insert(PTR_TO_IDX(ts), (uintptr_t)elem, (void *)ts->cur);
ts->elems[ts->cur++] = elem;
ts->length++;
@@ -125,14 +125,14 @@ void BLI_table_gset_remove(TableGSet *ts, void *elem, GHashKeyFreeFP freefp)
return;
}
- int *idx = (int *)BLI_smallhash_lookup_p(PTR_TO_IDX(ts), elem);
+ int *idx = (int *)BLI_smallhash_lookup_p(PTR_TO_IDX(ts), (uintptr_t)elem);
if (!idx) {
return;
}
int idx2 = *idx;
- BLI_smallhash_remove(PTR_TO_IDX(ts), elem);
+ BLI_smallhash_remove(PTR_TO_IDX(ts), (uintptr_t)elem);
if (!ts->elems || ts->elems[idx2] != elem) {
return;
@@ -144,7 +144,7 @@ void BLI_table_gset_remove(TableGSet *ts, void *elem, GHashKeyFreeFP freefp)
bool BLI_table_gset_haskey(TableGSet *ts, void *elem)
{
- return BLI_smallhash_haskey(PTR_TO_IDX(ts), elem);
+ return BLI_smallhash_haskey(PTR_TO_IDX(ts), (uintptr_t)elem);
}
int BLI_table_gset_len(TableGSet *ts)
diff --git a/source/blender/blenlib/intern/smallhash.c b/source/blender/blenlib/intern/smallhash.c
index d3c7c7f8958..c266743346d 100644
--- a/source/blender/blenlib/intern/smallhash.c
+++ b/source/blender/blenlib/intern/smallhash.c
@@ -68,8 +68,8 @@
#endif
#define SMHASH_KEY_UNUSED (uintptr_t)(MAKE_ID_8('s', 'm', 'h', 'k', 'u', 'n', 'u', 's'))
-#define SMHASH_CELL_FREE (uintptr_t)(MAKE_ID_8('s', 'm', 'h', 'c', 'f', 'r', 'e', 'e'))
-#define SMHASH_CELL_UNUSED (uintptr_t)(MAKE_ID_8('s', 'm', 'h', 'c', 'u', 'n', 'u', 's'))
+#define SMHASH_CELL_FREE (void *)(MAKE_ID_8('s', 'm', 'h', 'c', 'f', 'r', 'e', 'e'))
+#define SMHASH_CELL_UNUSED (void *)(MAKE_ID_8('s', 'm', 'h', 'c', 'u', 'n', 'u', 's'))
#define USE_REMOVE
More information about the Bf-blender-cvs
mailing list