mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fix nasty bug where the node copies did not get a proper id.
This commit is contained in:
committed by
Christoffer Lerno
parent
cf58da4a3c
commit
95f39f42eb
@@ -16,4 +16,5 @@ static inline type *name##_calloc(void) { \
|
||||
memset(ptr, 0, sizeof(type)); \
|
||||
return ptr; } \
|
||||
static inline type *name##ptr(type ## Id id) { return ((type *)name##_arena.ptr) + id; } \
|
||||
static inline type##Id name##id(type *ptr) { return (unsigned) { ptr - ((type *)name##_arena.ptr) }; }
|
||||
static inline type##Id name##id(type *ptr) { return (unsigned) { ptr - ((type *)name##_arena.ptr) }; } \
|
||||
static inline type *name##_copy(type *ptr) { type *x = name##_alloc(); memcpy(x, ptr, sizeof(type)); return x; }
|
||||
|
||||
Reference in New Issue
Block a user