nasmlib.h: clarify the semantics of nasm_aprintf_size()

nasm_aprintf_size() does include the final NUL byte, but does not
include any prefix storage allocated by nasm_[v]axprintf().

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin 2018-12-27 12:50:56 -08:00
parent 4c50b6c892
commit e88f752e67

View File

@ -66,7 +66,8 @@ char * safe_alloc end_with_null nasm_strcatn(const char *one, ...);
*
* nasm_[v]axprintf() are similar, but allocates a user-defined amount
* of storage before the string, and returns a pointer to the
* allocated buffer.
* allocated buffer. The value of nasm_aprintf_size() does *not* include
* this additional storage.
*/
char * safe_alloc printf_func(1, 2) nasm_asprintf(const char *fmt, ...);
char * safe_alloc nasm_vasprintf(const char *fmt, va_list ap);