From 934fd8a173ccad9aa1291c658dbac712eef78b4b Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 12 May 2024 20:12:00 -0400 Subject: Revert "Deprecate stack macro" This reverts commit 00ec635718f9ce397e46c614190a6c5ed4a9e82a. --- builtins/macros.h | 1 + 1 file changed, 1 insertion(+) (limited to 'builtins') diff --git a/builtins/macros.h b/builtins/macros.h index 7c40acc2..4fbaa5f5 100644 --- a/builtins/macros.h +++ b/builtins/macros.h @@ -6,5 +6,6 @@ #include #define heap(x) (__typeof(x)*)memcpy(GC_MALLOC(sizeof(x)), (__typeof(x)[1]){x}, sizeof(x)) +#define stack(x) (__typeof(x)*)((__typeof(x)[1]){x}) #define tagged(obj_expr, type_name, tag_name) ({ __typeof(obj_expr) obj = obj_expr; \ obj.$tag == $tag$##type_name##$##tag_name ? &obj.tag_name : NULL; }) -- cgit v1.2.3