aboutsummaryrefslogtreecommitdiff
path: root/teensy/mem.c
diff options
context:
space:
mode:
authoriamcheeseman <[email protected]>2026-05-09 17:15:10 -0400
committeriamcheeseman <[email protected]>2026-05-09 17:15:10 -0400
commit9ed5698b3c74c7ce1784d3bebe2aa73d5a0c319d (patch)
treea80df2a06ea9cf3ac2443a2fe683aaa2fdbafab5 /teensy/mem.c
parentcda8e15a87e46342a268b5da79f53ff53ebf6cbb (diff)
move more of the dynamic array code to be macros
Diffstat (limited to 'teensy/mem.c')
-rw-r--r--teensy/mem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/teensy/mem.c b/teensy/mem.c
index 2c938a6..fa885ca 100644
--- a/teensy/mem.c
+++ b/teensy/mem.c
@@ -35,7 +35,7 @@ void ty_init_mem(void)
ty_log_fatal(TY_ERR_MEM, "(%s) (track) ran out of memory", __func__);
#endif // TEENSY_DEBUG
- temp_allocations = ty_list_create(void*, 0);
+ temp_allocations = ty_list_create();
}
void ty_deinit_mem(void)
@@ -67,7 +67,7 @@ void ty_deinit_mem(void)
void ty_free_temp_allocs(void)
{
- for (int i = 0; i < ty_list_len(temp_allocations); i++) {
+ for (size_t i = 0; i < ty_list_len(temp_allocations); i++) {
void *temp = temp_allocations[i];
ty_free(temp);
}
@@ -140,7 +140,7 @@ void *ty_realloc(void *ptr, size_t new_size)
void *ty_talloc(size_t size)
{
void *ptr = ty_alloc(size);
- ty_list_append(void*, &temp_allocations, ptr);
+ ty_list_append(temp_allocations, ptr);
return ptr;
}