object: fix struct zero-initialisation on MSVC

This commit is contained in:
2024-11-14 22:00:30 +00:00
parent 93bc140bf8
commit b260159fae
3 changed files with 4 additions and 4 deletions

View File

@@ -26,7 +26,7 @@
#define B_HASHMAP_ITEM_END \
{ \
.key = {}, .value = {} \
.key = {0}, .value = {0} \
}
#define b_hashmap_foreach(it, hashmap) \

View File

@@ -6,7 +6,7 @@
#include <blue/object/string.h>
#define B_TREE(p) ((b_tree *)(p))
#define B_TREE_NODE_INIT ((b_tree_node) {})
#define B_TREE_NODE_INIT ((b_tree_node){0})
#define B_TREE_CONTAINER(t, m, v) \
((void *)((v) ? (uintptr_t)(v) - (offsetof(t, m)) : 0))