aboutsummaryrefslogtreecommitdiff
path: root/src/uthash_extra.h
diff options
context:
space:
mode:
authorallusive-dev <[email protected]>2023-09-19 17:47:33 +1000
committerallusive-dev <[email protected]>2023-09-19 17:47:33 +1000
commita93aba600b1c5d019b680b9f4ff3fa85d5d43a60 (patch)
tree77f8152222655657472a70e0bfa413a0495dd555 /src/uthash_extra.h
parentreset (diff)
downloadcompfy-a93aba600b1c5d019b680b9f4ff3fa85d5d43a60.tar.xz
compfy-a93aba600b1c5d019b680b9f4ff3fa85d5d43a60.zip
Fixed broken files/code and other errors
Diffstat (limited to 'src/uthash_extra.h')
-rw-r--r--src/uthash_extra.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/uthash_extra.h b/src/uthash_extra.h
new file mode 100644
index 0000000..cbc1056
--- /dev/null
+++ b/src/uthash_extra.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#include <uthash.h>
+
+#define HASH_ITER2(head, el) \
+ for (__typeof__(head) el = (head), __tmp = el != NULL ? el->hh.next : NULL; \
+ el != NULL; el = __tmp, __tmp = el != NULL ? el->hh.next : NULL)