diff options
author | ubq323 <ubq323@ubq323.website> | 2024-08-17 19:14:24 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-08-17 19:14:24 +0100 |
commit | 7d93de8e6d778c0f5e5aa9401f1acd5f7f092800 (patch) | |
tree | c70467acf4fb5520c86b85c8ed99be4db5417f00 /mem.h | |
parent | 7bb5157581422aa63e50cea38e526fbb2ef56a6e (diff) |
add backslash escape sequences to string literals
Diffstat (limited to 'mem.h')
-rw-r--r-- | mem.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -15,12 +15,12 @@ void *M(State *S, void *ptr, size_t old, size_t new); // needs len,cap,d fields #define ENSURE_CAP(S, darr, type, needed) \ - if (darr.cap < needed) { \ + do { if (darr.cap < needed) { \ size_t __newsz = next_pwrof2(needed); \ if (__newsz < 8) __newsz = 8; \ darr.d = RENEW_ARR(S, darr.d, type, darr.cap, __newsz); \ darr.cap = __newsz; \ - } + } } while (0) size_t next_pwrof2(size_t x); |