From f01b9c70bf9b4d8f13f8f006bd5bcd5cf28e5009 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Wed, 2 Oct 2024 22:32:07 +0200 Subject: [PATCH] Lib: added tmp_v?sprintf and tmp_strdup allocating from tmp_linpool --- lib/string.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/string.h b/lib/string.h index b139267c6..7e0491951 100644 --- a/lib/string.h +++ b/lib/string.h @@ -27,6 +27,9 @@ char *lp_vsprintf(linpool *p, const char *fmt, va_list args); #define tmp_sprintf(...) lp_sprintf(tmp_linpool, __VA_ARGS__) #define tmp_vsprintf(...) lp_vsprintf(tmp_linpool, __VA_ARGS__) +#define tmp_sprintf(...) lp_sprintf(tmp_linpool, __VA_ARGS__) +#define tmp_vsprintf(...) lp_vsprintf(tmp_linpool, __VA_ARGS__) + int buffer_vprint(buffer *buf, const char *fmt, va_list args); int buffer_print(buffer *buf, const char *fmt, ...); void buffer_puts(buffer *buf, const char *str); @@ -66,6 +69,8 @@ lp_strdup(linpool *lp, const char *c) return z; } +#define tmp_strdup(x) lp_strdup(tmp_linpool, (x)) + static inline char * mb_strdup(pool *p, const char *c) { -- 2.47.2