aboutsummaryrefslogtreecommitdiffstats
path: root/awk.h
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2017-04-26 11:32:18 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2017-04-26 11:32:18 -0400
commita3be85eec86d00c12e7f4b41a9e27794fbb479a6 (patch)
tree3d2f9efda67dd1461dc48872dcff6cb2a6caca0a /awk.h
parent8972aa34f007e12c3eb3270b79d39403d80a542f (diff)
downloadegawk-a3be85eec86d00c12e7f4b41a9e27794fbb479a6.tar.gz
egawk-a3be85eec86d00c12e7f4b41a9e27794fbb479a6.tar.bz2
egawk-a3be85eec86d00c12e7f4b41a9e27794fbb479a6.zip
Fix bug where Node_regex was setting valref, and restore valref to Node_val part of NODE union where it belongs.
Diffstat (limited to 'awk.h')
-rw-r--r--awk.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/awk.h b/awk.h
index 23552469..ab84c58b 100644
--- a/awk.h
+++ b/awk.h
@@ -374,6 +374,7 @@ typedef struct exp_node {
#endif
char *sp;
size_t slen;
+ long sref;
int idx;
wchar_t *wsp;
size_t wslen;
@@ -383,10 +384,6 @@ typedef struct exp_node {
NODETYPE type;
unsigned int flags;
- // We access valref for both Node_val and Node_regex values,
- // so it needs to be outside the union.
- long valref;
-
/* type = Node_val */
/*
* STRING and NUMBER are mutually exclusive, except for the special
@@ -494,6 +491,7 @@ typedef struct exp_node {
*/
#define stptr sub.val.sp
#define stlen sub.val.slen
+#define valref sub.val.sref
#define stfmt sub.val.idx
#define wstptr sub.val.wsp
#define wstlen sub.val.wslen