aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2018-12-27 12:50:56 -0800
committerH. Peter Anvin <hpa@zytor.com>2018-12-27 12:50:56 -0800
commite88f752e67967033511a5121a54db47f639c39be (patch)
tree86a1d08513ad57d0f9f5920a05634d65f4fc0b37 /include
parent4c50b6c8927ad98513d77cdc7c95344545f3226f (diff)
downloadnasm-e88f752e67967033511a5121a54db47f639c39be.tar.gz
nasm-e88f752e67967033511a5121a54db47f639c39be.tar.xz
nasm-e88f752e67967033511a5121a54db47f639c39be.zip
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>
Diffstat (limited to 'include')
-rw-r--r--include/nasmlib.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/nasmlib.h b/include/nasmlib.h
index f6d351da..c41a5bad 100644
--- a/include/nasmlib.h
+++ b/include/nasmlib.h
@@ -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);