diff options
Diffstat (limited to 'src/fstring.c')
-rw-r--r-- | src/fstring.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/fstring.c b/src/fstring.c index c2d48603b..b3050d8c2 100644 --- a/src/fstring.c +++ b/src/fstring.c @@ -273,6 +273,21 @@ fstralloc (memory_pool_t * pool, size_t len) } /* + * Allocate memory for f_str_t from temporary pool + */ +f_str_t * +fstralloc_tmp (memory_pool_t * pool, size_t len) +{ + f_str_t *res = memory_pool_alloc_tmp (pool, sizeof (f_str_t)); + + res->begin = memory_pool_alloc_tmp (pool, len); + + res->size = len; + res->len = 0; + return res; +} + +/* * Truncate string to its len */ f_str_t * |