return mem;
}
-/* TODO(#478): all instances of calloc should be replaced with nth_calloc (except ebisp) */
void *nth_calloc(size_t num, size_t size)
{
void *mem = calloc(num, size);
console_log->font_size = font_size;
console_log->capacity = capacity;
- console_log->buffer = PUSH_LT(lt, calloc(capacity, sizeof(char*)), free);
+ console_log->buffer = PUSH_LT(lt, nth_calloc(capacity, sizeof(char*)), free);
if (console_log->buffer == NULL) {
throw_error(ERROR_TYPE_LIBC);
RETURN_LT(lt, NULL);
}
- console_log->colors = PUSH_LT(lt, calloc(capacity, sizeof(Color)), free);
+ console_log->colors = PUSH_LT(lt, nth_calloc(capacity, sizeof(Color)), free);
if (console_log->colors == NULL) {
throw_error(ERROR_TYPE_LIBC);
RETURN_LT(lt, NULL);
history->begin = 0;
history->cursor = 0;
- history->buffer = PUSH_LT(lt, calloc(capacity, sizeof(char*)), free);
+ history->buffer = PUSH_LT(lt, nth_calloc(capacity, sizeof(char*)), free);
if (history->buffer == NULL) {
throw_error(ERROR_TYPE_LIBC);
RETURN_LT(lt, NULL);