Remove unused defines, done TODO

This commit is contained in:
Lucien Cartier-Tilet 2020-10-07 18:58:46 +02:00
parent 8e29343f3e
commit ff59b301cc
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -28,24 +28,6 @@
__LINE__, \ __LINE__, \
__VA_ARGS__); \ __VA_ARGS__); \
} }
#define foreach(item, vector) \
for (int keep = 1, \
count = 0, \
size = sizeof(vector->elements) / sizeof vector->elements; \
keep && count != size; \
keep = !keep, count++) \
for (item = \
(void *)((char *)(vector->elements) + (count * sizeof(void *))); \
keep; \
keep = !keep)
#ifndef ARRAY_SIZE
# define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#endif
// TODO
// `sizeof()' does NOT work with dynamically allocated memory. Vector capacity
// must be tracked manually
/* Destructor typedef */ /* Destructor typedef */
typedef void (*Destructor)(void *element); typedef void (*Destructor)(void *element);