tomo/builtins/macros.h
2024-09-05 15:33:43 -04:00

10 lines
219 B
C

#pragma once
// A few helper macros
#include <gc.h>
#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})