diff options
Diffstat (limited to 'gawkapi.h')
-rw-r--r-- | gawkapi.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -278,6 +278,12 @@ enum { * The API deals exclusively with regular chars; these strings may * 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! */ typedef struct awk_string { char *str; /* data */ |