typed list declaration

This commit is contained in:
Maxim Devaev
2026-08-30 00:16:47 +03:00
parent db87e03ce7
commit 3af6bfac0f
4 changed files with 10 additions and 10 deletions

View File

@@ -25,9 +25,9 @@
#include "tools.h"
#define US_LIST_DECLARE \
void *prev; \
void *next;
#define US_LIST_DECLARE(x_type) \
x_type *prev; \
x_type *next;
#define US_LIST_ITERATE(x_first, x_item, ...) { \
for (__typeof__(x_first) x_item = x_first; x_item;) { \