Fix ordering of @builtin. malloc <-> alloc, malloc, calloc, realloc, free builtins.

This commit is contained in:
Christoffer Lerno
2022-08-04 01:35:35 +02:00
parent f966250185
commit 6d2ab0c985
22 changed files with 158 additions and 113 deletions

View File

@@ -44,7 +44,7 @@ fn bool contains(char[] haystack, char[] needle)
macro @dupe(value)
{
$typeof(&value) temp = mem::alloc_checked($sizeof(value))?;
$typeof(&value) temp = malloc_checked($sizeof(value))?;
*temp = value;
return temp;
}

View File

@@ -32,7 +32,7 @@ fn int! askGuess(int high)
fn char[]! readLine()
{
char* chars = mem::talloc(1024)?;
char* chars = tmalloc(1024)?;
isize loaded = getline(&chars, &&(usize)1023, libc::stdin());
if (loaded < 0) return InputResult.FAILED_TO_READ!;
chars[loaded] = 0;