aboutsummaryrefslogtreecommitdiff
path: root/types.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-03-08 14:23:16 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-03-08 14:23:16 -0500
commit07c2b0ec26600d8609870d9f5c0867d48b801db4 (patch)
tree9c7f5cf8c394312e3da4a2371081d2a64b622b6e /types.h
parent8e62018546cd9beb357b0452535cf216c7cfa0cc (diff)
Array methods
Diffstat (limited to 'types.h')
-rw-r--r--types.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/types.h b/types.h
index 6226ab40..696835a8 100644
--- a/types.h
+++ b/types.h
@@ -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;