aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/fstring.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-12-16 17:56:32 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-12-16 17:56:32 +0000
commit98ef56b2b103b07f7678cc47cd0ccbb0a48c5616 (patch)
tree5ff7e56808df37652e41816a60c3786fa4630938 /src/libutil/fstring.h
parent93921086efc8a5dc56886f16b0d5cfad57cc0629 (diff)
downloadrspamd-98ef56b2b103b07f7678cc47cd0ccbb0a48c5616.tar.gz
rspamd-98ef56b2b103b07f7678cc47cd0ccbb0a48c5616.zip
[Minor] Add macro to make ftok_t from string literal
Diffstat (limited to 'src/libutil/fstring.h')
-rw-r--r--src/libutil/fstring.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libutil/fstring.h b/src/libutil/fstring.h
index e23bd5e19..c1b205817 100644
--- a/src/libutil/fstring.h
+++ b/src/libutil/fstring.h
@@ -177,4 +177,6 @@ gchar *rspamd_ftokdup (const rspamd_ftok_t *src) G_GNUC_WARN_UNUSED_RESULT;
* @return
*/
gchar *rspamd_fstringdup (const rspamd_fstring_t *src) G_GNUC_WARN_UNUSED_RESULT;
+
+#define RSPAMD_FTOK_ASSIGN(t, lit) do { (t)->begin = (lit); (t)->len = sizeof(lit) - 1; } while (0)
#endif