diff options
| author | 2022-08-10 04:12:33 +0200 | |
|---|---|---|
| committer | 2022-08-10 04:12:33 +0200 | |
| commit | b33ee6afa74ab1e83554d1b535d81c7df0b3fca5 (patch) | |
| tree | d5fb52a1529bf35658468adae796757e664bc792 /src/util.cff | |
| parent | 769aa95cf3374117c86ec652117dcbab97497eec (diff) | |
many bugfix
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; +} + |