From ce342a04922797cb53557178c54d32c4efafda16 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Wed, 6 Jul 2016 21:31:22 -0400 Subject: Document string termination in header files and remove no-longer-needed string termination logic in various places. --- gawkapi.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'gawkapi.h') diff --git a/gawkapi.h b/gawkapi.h index 975f82df..10eab1cf 100644 --- a/gawkapi.h +++ b/gawkapi.h @@ -279,11 +279,7 @@ enum { * be multibyte encoded in the current locale's encoding and character * set. Gawk will convert internally to wide characters if necessary. * - * Note that the string may not be terminated with a '\0' character. - * In particular, this happens for field values $n where n > 0 and n < NF, - * since the string points directly into the $0 buffer. All other strings, - * including those created by extensions, should be NUL-terminated. In general - * though, extension code should not assume that the string is NUL-terminated! + * Note that the string will always be terminated with a '\0' character. */ typedef struct awk_string { char *str; /* data */ -- cgit v1.2.3