[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-475
From: |
Andrew J. Schorr |
Subject: |
[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-475-g0ea9121 |
Date: |
Sun, 09 Nov 2014 14:28:05 +0000 |
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, gawk-4.1-stable has been updated
via 0ea9121e4bf07514d75024837fe4dd1c615c8ec0 (commit)
from 50925902635e9b66288318fd768157dbeb529f08 (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=0ea9121e4bf07514d75024837fe4dd1c615c8ec0
commit 0ea9121e4bf07514d75024837fe4dd1c615c8ec0
Author: Andrew J. Schorr <address@hidden>
Date: Sun Nov 9 09:27:07 2014 -0500
Fix api to treat an uninitialized value as AWK_UNDEFINED.
diff --git a/ChangeLog b/ChangeLog
index a7b6696..99aee7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-11-09 Andrew J. Schorr <address@hidden>
+
+ * gawkapi.c (node_to_awk_value): When the type wanted is AWK_UNDEFINED
+ and a it's a Node_val set to Nnull_string, return AWK_UNDEFINED instead
+ of AWK_NUMBER 0.
+
2014-11-03 Norihiro Tanaka <address@hidden>
* re.c (research): Use dfa superset to improve matching speed.
diff --git a/gawkapi.c b/gawkapi.c
index bcf8d90..06f3192 100644
--- a/gawkapi.c
+++ b/gawkapi.c
@@ -441,7 +441,10 @@ node_to_awk_value(NODE *node, awk_value_t *val,
awk_valtype_t wanted)
case AWK_UNDEFINED:
/* return true and actual type for request of undefined
*/
- if ((node->flags & NUMBER) != 0) {
+ if (node == Nnull_string) {
+ val->val_type = AWK_UNDEFINED;
+ ret = awk_true;
+ } else if ((node->flags & NUMBER) != 0) {
val->val_type = AWK_NUMBER;
val->num_value = get_number_d(node);
ret = awk_true;
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
gawkapi.c | 5 ++++-
2 files changed, 10 insertions(+), 1 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-475-g0ea9121,
Andrew J. Schorr <=