win: track windows with a hash table

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-04-03 08:36:02 +01:00
parent 3935e97e69
commit a68903b9ef
10 changed files with 133 additions and 102 deletions

7
src/uthash_extra.h Normal file
View File

@@ -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)