diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-06-10 12:03:27 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-06-10 12:03:27 +0100 |
commit | bad0ee381608c99a22c7b0e3146d6372c22736f9 (patch) | |
tree | a9619dbbda1f83643778903fb8c40b0da8fcefbf /src/libutil/fstring.h | |
parent | 06f9bb71dbd6953bda4e9330a852d221deed05ac (diff) | |
download | rspamd-bad0ee381608c99a22c7b0e3146d6372c22736f9.tar.gz rspamd-bad0ee381608c99a22c7b0e3146d6372c22736f9.zip |
[Feature] Improve fstrings API
Diffstat (limited to 'src/libutil/fstring.h')
-rw-r--r-- | src/libutil/fstring.h | 9 |
1 files changed, 9 insertions, 0 deletions
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 @@ -147,6 +147,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 * @param needed_len |