mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fix ordering of @builtin. malloc <-> alloc, malloc, calloc, realloc, free builtins.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user