diff options
author | Quentin Carbonneaux <quentin@c9x.me> | 2022-09-02 12:08:52 +0200 |
---|---|---|
committer | Quentin Carbonneaux <quentin@c9x.me> | 2022-10-03 10:41:30 +0200 |
commit | 70f297bab7ae5d7291040b0305281a5fa8289f80 (patch) | |
tree | 85305108a954e2c21f16c3e529cf5fab7a189a77 /util.c | |
parent | 79f3673d205617ac567f0566ebf8f450932d9976 (diff) | |
download | roux-70f297bab7ae5d7291040b0305281a5fa8289f80.tar.gz |
fix case of Pool constants
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util.c b/util.c index 6a33d1a..ab4a90b 100644 --- a/util.c +++ b/util.c @@ -116,7 +116,7 @@ vnew(ulong len, size_t esz, Pool pool) for (cap=VMin; cap<len; cap*=2) ; - f = pool == Pheap ? emalloc : alloc; + f = pool == PHeap ? emalloc : alloc; v = f(cap * esz + sizeof(Vec)); v->mag = VMag; v->cap = cap; @@ -132,7 +132,7 @@ vfree(void *p) v = (Vec *)p - 1; assert(v->mag == VMag); - if (v->pool == Pheap) { + if (v->pool == PHeap) { v->mag = 0; free(v); } @@ -172,7 +172,7 @@ intern(char *s) if (n == 1<<(32-IBits)) die("interning table overflow"); if (n == 0) - b->str = vnew(1, sizeof b->str[0], Pheap); + b->str = vnew(1, sizeof b->str[0], PHeap); else if ((n & (n-1)) == 0) vgrow(&b->str, n+n); |