Copying and printing the copy

This commit is contained in:
Krzosa Karol
2023-03-31 22:44:11 +02:00
parent e70d544029
commit b6835d0f6a
5 changed files with 26 additions and 9 deletions

View File

@@ -79,7 +79,6 @@ arena_push_size(Arena *a, size_t size) {
#define push_struct_copy(a, T, p) (T *)push_copy(a, p, sizeof(T))
CORE_Static void *
push_copy(Arena *a, void *p, size_t size) {
if (p == 0) return 0;
void *result = arena_push_size(a, size);
memory_copy(result, p, size);
return result;