From bad0ee381608c99a22c7b0e3146d6372c22736f9 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 10 Jun 2016 12:03:27 +0100 Subject: [Feature] Improve fstrings API --- src/libutil/fstring.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/libutil/fstring.h') diff --git a/src/libutil/fstring.h b/src/libutil/fstring.h index 0bd9a271d..e23bd5e19 100644 --- a/src/libutil/fstring.h +++ b/src/libutil/fstring.h @@ -146,6 +146,15 @@ void rspamd_fstring_mapped_ftok_free (gpointer p); */ rspamd_ftok_t *rspamd_ftok_map (const rspamd_fstring_t *s); +/** + * Suggest suitable size to grow fstring + * @param len + * @param allocated + * @param needed_len + * @return + */ +gsize rspamd_fstring_suggest_size (gsize len, gsize allocated, gsize needed_len); + /** * Grow the specified fixed string * @param str -- cgit v1.2.3