diff options
Diffstat (limited to 'src/util.cff')
| -rw-r--r-- | src/util.cff | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/util.cff b/src/util.cff new file mode 100644 index 0000000..36a0c13 --- /dev/null +++ b/src/util.cff @@ -0,0 +1,14 @@ +import "all.hff"; + +extern fn xmalloc(n usize) *void { + let p = malloc(n); + assert(p != #null, "malloc"); + return p; +} + +extern fn xrealloc(p *void, n usize) *void { + let p = realloc(p, n); + assert(p != #null, "realloc"); + return p; +} + |