[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, feature/fixtype, updated. gawk-4.1.0-186
From: |
Andrew J. Schorr |
Subject: |
[gawk-diffs] [SCM] gawk branch, feature/fixtype, updated. gawk-4.1.0-1865-g6e3f356 |
Date: |
Tue, 28 Jun 2016 00:43:20 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, feature/fixtype has been updated
via 6e3f3560c1be80583b4045a627e483c572c895b3 (commit)
from 25b0547949a05839988dae236fa9a28be6573586 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=6e3f3560c1be80583b4045a627e483c572c895b3
commit 6e3f3560c1be80583b4045a627e483c572c895b3
Author: Andrew J. Schorr <address@hidden>
Date: Mon Jun 27 20:43:08 2016 -0400
Add comment to gawkapi.h about string termination.
diff --git a/ChangeLog b/ChangeLog
index 24dcaf3..16f7f18 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2016-06-27 Andrew J. Schorr <address@hidden>
+ * gawkapi.h (awk_string): Add comment about the potential lack of
+ NUL-termination.
+
+2016-06-27 Andrew J. Schorr <address@hidden>
+
* awk.h: Add a comment regarding the potential lack of NUL-termination
for Node_val strings.
diff --git a/gawkapi.h b/gawkapi.h
index f024460..975f82d 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 */
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
gawkapi.h | 6 ++++++
2 files changed, 11 insertions(+)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, feature/fixtype, updated. gawk-4.1.0-1865-g6e3f356,
Andrew J. Schorr <=