diff th_string.h @ 744:4181d43f91f9

Change th_pstr_printf()/th_pstr_vprintf() to return pointer to the newly allocated string buffer, instead of void.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 14 Dec 2022 22:58:12 +0200
parents 31bc1ed07cf5
children c9a6fe116453
line wrap: on
line diff
--- a/th_string.h	Wed Dec 14 01:38:31 2022 +0200
+++ b/th_string.h	Wed Dec 14 22:58:12 2022 +0200
@@ -164,8 +164,8 @@
 th_char_t   *th_strdup_printf(const th_char_t *fmt, ...)
             TH_ATTR_PRINTF_FMT(1, 2);
 
-void        th_pstr_vprintf(th_char_t **buf, const th_char_t *fmt, va_list ap);
-void        th_pstr_printf(th_char_t **buf, const th_char_t *fmt, ...)
+th_char_t  *th_pstr_vprintf(th_char_t **buf, const th_char_t *fmt, va_list ap);
+th_char_t  *th_pstr_printf(th_char_t **buf, const th_char_t *fmt, ...)
             TH_ATTR_PRINTF_FMT(2, 3);
 
 int         th_pstr_cpy(th_char_t **pdst, const th_char_t *src);