aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-10-15 13:23:39 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-10-15 13:23:39 +0100
commit9710cbb0853e4a0841e542e90c29e6e556aeed04 (patch)
tree8e3c9438a8d1d5ca9b9cd36a4a1c48c321bd6cf0 /src/libutil
parent051bf27668e4f4abb880bd2c259eec0eec7cb9c1 (diff)
downloadrspamd-9710cbb0853e4a0841e542e90c29e6e556aeed04.tar.gz
rspamd-9710cbb0853e4a0841e542e90c29e6e556aeed04.zip
Implement va_list version for gstring printf.
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/printf.c8
-rw-r--r--src/libutil/printf.h1
2 files changed, 8 insertions, 1 deletions
diff --git a/src/libutil/printf.c b/src/libutil/printf.c
index 98c896934..772a68745 100644
--- a/src/libutil/printf.c
+++ b/src/libutil/printf.c
@@ -293,12 +293,18 @@ rspamd_printf_gstring (GString *s, const gchar *fmt, ...)
glong r;
va_start (args, fmt);
- r = rspamd_vprintf_common (rspamd_printf_append_gstring, s, fmt, args);
+ r = rspamd_vprintf_gstring (s, fmt, args);
va_end (args);
return r;
}
+glong
+rspamd_vprintf_gstring (GString *s, const gchar *fmt, va_list args)
+{
+ return rspamd_vprintf_common (rspamd_printf_append_gstring, s, fmt, args);
+}
+
#define RSPAMD_PRINTF_APPEND(buf, len) \
do { \
RSPAMD_PRINTF_APPEND_BUF(buf, len); \
diff --git a/src/libutil/printf.h b/src/libutil/printf.h
index 34df20a76..2bc421143 100644
--- a/src/libutil/printf.h
+++ b/src/libutil/printf.h
@@ -73,6 +73,7 @@ glong rspamd_snprintf (gchar *buf, glong max, const gchar *fmt, ...);
gchar * rspamd_vsnprintf (gchar *buf, glong max, const gchar *fmt,
va_list args);
glong rspamd_printf_gstring (GString *s, const gchar *fmt, ...);
+glong rspamd_vprintf_gstring (GString *s, const gchar *fmt, va_list args);
glong rspamd_vprintf_common (rspamd_printf_append_func func,
gpointer apd,