diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-05-12 20:12:00 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-05-12 20:12:00 -0400 |
| commit | 934fd8a173ccad9aa1291c658dbac712eef78b4b (patch) | |
| tree | fab88ac99a94dbc264e0c33388d4df6223731f0c /builtins/macros.h | |
| parent | 00ec635718f9ce397e46c614190a6c5ed4a9e82a (diff) | |
Revert "Deprecate stack macro"
This reverts commit 00ec635718f9ce397e46c614190a6c5ed4a9e82a.
Diffstat (limited to 'builtins/macros.h')
| -rw-r--r-- | builtins/macros.h | 1 |
1 files changed, 1 insertions, 0 deletions
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 <string.h> #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; }) |
