aboutsummaryrefslogtreecommitdiff
path: root/src/util.cff
blob: 36a0c13ca87ed77af760307fe58bc12348ec7e5b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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;
}