From 649977aae7e5922f992cd69eb84da0a2db368580 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 24 Dec 2025 12:45:29 -0500 Subject: Split out new()/gc logic from stdlib/util.h --- src/util.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/util.h') diff --git a/src/util.h b/src/util.h index 79cb31d8..53b10a83 100644 --- a/src/util.h +++ b/src/util.h @@ -1,3 +1,7 @@ #pragma once +#include // IWYU pragma: export + #include "./stdlib/util.h" // IWYU pragma: export + +#define new(t, ...) ((t *)memcpy(GC_MALLOC(sizeof(t)), &(t){__VA_ARGS__}, sizeof(t))) -- cgit v1.2.3