diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-11-09 08:31:26 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-11-09 08:31:26 +0000 |
commit | 63ee3e00db2982e8053e2e7450cf05b268b92506 (patch) | |
tree | 86df076eddfd06f53f9e56a358086490bb254a34 /src/libutil/fstring.h | |
parent | 6d87018738712b7d01120ad3584b5db225255ce8 (diff) | |
download | rspamd-63ee3e00db2982e8053e2e7450cf05b268b92506.tar.gz rspamd-63ee3e00db2982e8053e2e7450cf05b268b92506.zip |
[Minor] Add routine to convert an ftok_t to a C string
Diffstat (limited to 'src/libutil/fstring.h')
-rw-r--r-- | src/libutil/fstring.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libutil/fstring.h b/src/libutil/fstring.h index e5d34e022..1f194827c 100644 --- a/src/libutil/fstring.h +++ b/src/libutil/fstring.h @@ -87,12 +87,17 @@ void rspamd_fstring_erase (rspamd_fstring_t *str, gsize pos, gsize len); #define rspamd_fstring_clear(s) rspamd_fstring_erase(s, 0, s->len) /** - * Convert fixed string to a zero terminated string. This string should be + * Convert fixed string to a zero terminated string. This string must be * freed by a caller */ char * rspamd_fstring_cstr (const rspamd_fstring_t *str) G_GNUC_WARN_UNUSED_RESULT; - +/** + * Convert fixed string usign ftok_t to a zero terminated string. This string must be + * freed by a caller + */ +char * rspamd_ftok_cstr (const rspamd_ftok_t *str) + G_GNUC_WARN_UNUSED_RESULT; /* * Return fast hash value for fixed string converted to lowercase */ |