Improve tracef/tracelog to use the stack for small strings
authorNorbert Lange <nolange79@gmail.com>
Mon, 1 Aug 2022 14:35:24 +0000 (16:35 +0200)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 1 Aug 2022 15:07:02 +0000 (11:07 -0400)
Support two common cases, one being that the resulting message is
small enough to fit into a on-stack buffer.
The seconds being the common 'printf("%s", "Message")' scheme.

Unfortunately, iterating a va_list is destructive,
so it has to be copied before calling vprintf.

The implementation was moved to a separate file,
used by both tracef.c and tracelog.c.

Signed-off-by: Norbert Lange <nolange79@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

No differences found
This page took 0.025677 seconds and 4 git commands to generate.