summaryrefslogtreecommitdiff
path: root/std
diff options
context:
space:
mode:
Diffstat (limited to 'std')
-rw-r--r--std/mem.toc6
1 files changed, 3 insertions, 3 deletions
diff --git a/std/mem.toc b/std/mem.toc
index 5e8c5fa..6d16895 100644
--- a/std/mem.toc
+++ b/std/mem.toc
@@ -3,12 +3,12 @@ calloc ::= #foreign("calloc", "libc.so.6") fn(#C size_t, #C size_t) #C &"void";
free ::= #foreign("free", "libc.so.6") fn(#C &"void");
new ::= fn(t :: Type) &t {
- calloc(1, (sizeof t) as u64)
+ calloc(1, (sizeof t) as #C size_t)
}
news ::= fn(t :: Type, n : int) []t {
s: []t;
- s.data = calloc(n as u64, (sizeof t) as u64);
+ s.data = calloc(n as #C size_t, (sizeof t) as #C size_t);
s.len = n;
s
}
@@ -20,4 +20,4 @@ del ::= fn(t::=, x: &t) {
dels ::= fn(t::=, x: []t) {
free(x.data);
-} \ No newline at end of file
+}