diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-12-24 12:45:29 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-12-24 12:52:48 -0500 |
| commit | 649977aae7e5922f992cd69eb84da0a2db368580 (patch) | |
| tree | e61d35b74d2551901cc8f3f034aca7da1f375a8c /src/util.h | |
| parent | 88ccdab43c0a3ee53177e21a28724e496406a376 (diff) | |
Split out new()/gc logic from stdlib/util.h
Diffstat (limited to 'src/util.h')
| -rw-r--r-- | src/util.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1,3 +1,7 @@ #pragma once +#include <gc.h> // IWYU pragma: export + #include "./stdlib/util.h" // IWYU pragma: export + +#define new(t, ...) ((t *)memcpy(GC_MALLOC(sizeof(t)), &(t){__VA_ARGS__}, sizeof(t))) |
