summaryrefslogtreecommitdiff
path: root/std/mem.toc
diff options
context:
space:
mode:
Diffstat (limited to 'std/mem.toc')
-rw-r--r--std/mem.toc6
1 files changed, 6 insertions, 0 deletions
diff --git a/std/mem.toc b/std/mem.toc
index ef4e638..1e21702 100644
--- a/std/mem.toc
+++ b/std/mem.toc
@@ -23,3 +23,9 @@ del ::= fn(t::=, x: &t) {
dels ::= fn(t::=, x: []t) {
free(x.data);
}
+
+// @TODO: write your own
+memcpy ::= #foreign("memcpy", base.libc) fn(&void, #C &"const void", #C size_t) &void;
+mem_copy ::= fn(dst: &void, src: &void, n: int) {
+ memcpy(dst, src, n as #C size_t);
+}