diff options
Diffstat (limited to 'src/sbuffer.h')
-rw-r--r-- | src/sbuffer.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sbuffer.h b/src/sbuffer.h index 92ac811..3558bbc 100644 --- a/src/sbuffer.h +++ b/src/sbuffer.h @@ -24,7 +24,9 @@ struct buf_hdr #define buf_last(b) ((b)[buf_len(b)-1]) #define buf_free(b) ((b) ? free(buf__hdr(b)) : 0) -static void *buf__grow_f(const void *buf, size_t new_len, size_t elem_size) +#define internal static + +internal void *buf__grow_f(const void *buf, size_t new_len, size_t elem_size) { size_t new_cap = MAX(1 + 2*buf_cap(buf), new_len); size_t new_size = OFFSETOF(struct buf_hdr, buf) + new_cap*elem_size; @@ -36,4 +38,6 @@ static void *buf__grow_f(const void *buf, size_t new_len, size_t elem_size) return new_hdr->buf; } +#undef internal + #endif |