aboutsummaryrefslogtreecommitdiff
path: root/builtins
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-05-12 13:50:06 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-05-12 13:50:06 -0400
commitd143c72b2267883c229a09cc27bbeafcf2c3fd70 (patch)
tree90312f0e4ee553e0588dc3c45f955b5184bf3778 /builtins
parenta20f522fd61698282d3e01931260c588dd7f40b1 (diff)
WIP, but functional interfaces
Diffstat (limited to 'builtins')
-rw-r--r--builtins/util.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/builtins/util.h b/builtins/util.h
index a091c40e..1b5664d7 100644
--- a/builtins/util.h
+++ b/builtins/util.h
@@ -13,7 +13,6 @@
#define streq(a, b) (((a) == NULL && (b) == NULL) || (((a) == NULL) == ((b) == NULL) && strcmp(a, b) == 0))
#define new(t, ...) ((t*)memcpy(GC_MALLOC(sizeof(t)), &(t){__VA_ARGS__}, sizeof(t)))
#define copy(obj_ptr) ((__typeof(obj_ptr))memcpy(GC_MALLOC(sizeof(*(obj_ptr))), obj_ptr, sizeof(*(obj_ptr))))
-#define grow(arr, new_size) ((typeof (arr))GC_REALLOC(arr, (sizeof(arr[0]))*(new_size)))
#define Match(x, _tag) ((x)->tag == _tag ? &(x)->__data._tag : (errx(1, __FILE__ ":%d This was supposed to be a " # _tag "\n", __LINE__), &(x)->__data._tag))
#define Tagged(t, _tag, ...) new(t, .tag=_tag, .__data._tag={__VA_ARGS__})