mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
@ is now part of the name of an attribute or a macro. Macros without '@' must be function-like.
This commit is contained in:
@@ -9,7 +9,6 @@ import std::mem;
|
||||
**/
|
||||
macro alloc($Type, usize elements)
|
||||
{
|
||||
assert($Type.max / elements < $Type.sizeof);
|
||||
$Type* ptr = mem::alloc($Type.sizeof * elements, $alignof($Type));
|
||||
return ptr[0..(elements - 1)];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user