aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/fstring.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-06-10 12:03:27 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-06-10 12:03:27 +0100
commitbad0ee381608c99a22c7b0e3146d6372c22736f9 (patch)
treea9619dbbda1f83643778903fb8c40b0da8fcefbf /src/libutil/fstring.h
parent06f9bb71dbd6953bda4e9330a852d221deed05ac (diff)
downloadrspamd-bad0ee381608c99a22c7b0e3146d6372c22736f9.tar.gz
rspamd-bad0ee381608c99a22c7b0e3146d6372c22736f9.zip
[Feature] Improve fstrings API
Diffstat (limited to 'src/libutil/fstring.h')
-rw-r--r--src/libutil/fstring.h9
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