diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-03-08 14:23:16 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-03-08 14:23:16 -0500 |
| commit | 07c2b0ec26600d8609870d9f5c0867d48b801db4 (patch) | |
| tree | 9c7f5cf8c394312e3da4a2371081d2a64b622b6e /types.h | |
| parent | 8e62018546cd9beb357b0452535cf216c7cfa0cc (diff) | |
Array methods
Diffstat (limited to 'types.h')
| -rw-r--r-- | types.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -16,6 +16,12 @@ typedef struct arg_s { struct arg_s *next; } arg_t; +#define ARG_LIST(...) ({\ + arg_t *args[] = {__VA_ARGS__}; \ + for (size_t i = 0; i < sizeof(args)/sizeof(args[0])-1; i++) \ + args[i]->next = args[i+1]; \ + args[0]; }) + typedef struct tag_s { const char *name; int64_t tag_value; |
