0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09:41:54 +00:00

Lib: added tmp_v?sprintf and tmp_strdup allocating from tmp_linpool

This commit is contained in:
Maria Matejka 2024-10-02 22:32:07 +02:00
parent 169677deeb
commit 850bbf02c1

View File

@ -25,6 +25,9 @@ char *mb_vsprintf(pool *p, const char *fmt, va_list args);
char *lp_sprintf(linpool *p, const char *fmt, ...);
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__)
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);
@ -62,6 +65,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)
{