diff options
Diffstat (limited to 'tests/std/mem.toc')
-rw-r--r-- | tests/std/mem.toc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/std/mem.toc b/tests/std/mem.toc index 6d16895..e283364 100644 --- a/tests/std/mem.toc +++ b/tests/std/mem.toc @@ -1,6 +1,8 @@ +#include "std/base.toc"; + // TODO: check for failed calloc -calloc ::= #foreign("calloc", "libc.so.6") fn(#C size_t, #C size_t) #C &"void"; -free ::= #foreign("free", "libc.so.6") fn(#C &"void"); +calloc ::= #foreign("calloc", libc) fn(#C size_t, #C size_t) #C &"void"; +free ::= #foreign("free", libc) fn(#C &"void"); new ::= fn(t :: Type) &t { calloc(1, (sizeof t) as #C size_t) |