aboutsummaryrefslogtreecommitdiff
path: root/src/uthash_extra.h
diff options
context:
space:
mode:
authorAllusive_ <[email protected]>2023-08-01 09:00:18 +1000
committerGitHub <[email protected]>2023-08-01 09:00:18 +1000
commit0147e7dd165f837662a480938e2083a5ac707586 (patch)
tree3e38624c86c7119703cddb524ac01278491c8a3f /src/uthash_extra.h
parentAdd files via upload (diff)
downloadcompfy-0147e7dd165f837662a480938e2083a5ac707586.tar.xz
compfy-0147e7dd165f837662a480938e2083a5ac707586.zip
Add files via upload
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)