aboutsummaryrefslogtreecommitdiffstats
path: root/gawkapi.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-07-04 05:41:05 +0300
committerArnold D. Robbins <arnold@skeeve.com>2016-07-04 05:41:05 +0300
commit414cd1eccff2d6d6415e1f65ac2e51e7c1b33890 (patch)
treeec23aa620134a1c949840c1c9e3294ba89a83a43 /gawkapi.h
parent093f27aa0d53494c257cf16a57b01ad43f70cdff (diff)
parentff4e0706c5ee5dffd69168ebd0ff5f53e474d048 (diff)
downloadegawk-414cd1eccff2d6d6415e1f65ac2e51e7c1b33890.tar.gz
egawk-414cd1eccff2d6d6415e1f65ac2e51e7c1b33890.tar.bz2
egawk-414cd1eccff2d6d6415e1f65ac2e51e7c1b33890.zip
Merge branch 'master' into feature/cmake
Diffstat (limited to 'gawkapi.h')
-rw-r--r--gawkapi.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gawkapi.h b/gawkapi.h
index f0244604..975f82df 100644
--- a/gawkapi.h
+++ b/gawkapi.h
@@ -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 */