aboutsummaryrefslogtreecommitdiff
path: root/builtins
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-03-03 15:14:59 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-03-03 15:14:59 -0500
commit2a7cfd7c3665c441c25094c12bde02ddc565061c (patch)
tree38e670a74d5551c5345fa31e27c62f4f81188003 /builtins
parent00e7ce2bd089ed8180d8e819b8260a3ba9eb13f1 (diff)
Fix table literal issue for TCC compatibility
Diffstat (limited to 'builtins')
-rw-r--r--builtins/table.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtins/table.h b/builtins/table.h
index 14a97977..436eaf42 100644
--- a/builtins/table.h
+++ b/builtins/table.h
@@ -8,7 +8,8 @@
#include "array.h"
#define $Table(key_t, val_t, key_info, value_info, fb, def, ...) ({ \
- struct { key_t k; val_t v; } $ents[] = {__VA_ARGS__}; \
+ struct $entry_s { key_t k; val_t v; }; \
+ struct $entry_s $ents[] = {__VA_ARGS__}; \
table_t $table = Table_from_entries((array_t){ \
.data=memcpy(GC_MALLOC(sizeof($ents)), $ents, sizeof($ents)), \
.length=sizeof($ents)/sizeof($ents[0]), \