gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-1494-g9af756


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-1494-g9af756a
Date: Mon, 29 Jun 2015 19:38:12 +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, master has been updated
       via  9af756aab86e7cc9e549bdcf89aac2425aee8950 (commit)
      from  5cb179dbcfe1503b2eaffa87b5f7502f41482be2 (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=9af756aab86e7cc9e549bdcf89aac2425aee8950

commit 9af756aab86e7cc9e549bdcf89aac2425aee8950
Author: Arnold D. Robbins <address@hidden>
Date:   Mon Jun 29 22:37:55 2015 +0300

    Typed regex fix, if in an array.

diff --git a/ChangeLog b/ChangeLog
index 51ab8fb..6ee7e25 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,8 @@
        a function in a user-defined function body, treat it normally.
        Makes eval "print and(a, 1)" work in the debugger again.
        Thanks, yet again, to Hermann Peifer.
+       * interpret.h (r_interpret): Op_subscript. UPREF if the
+       element value is a typed regexp.  Thanks to Hermann Peifer.
 
 2015-06-28         Arnold D. Robbins     <address@hidden>
 
diff --git a/interpret.h b/interpret.h
index 0a5cbbf..f165ef7 100644
--- a/interpret.h
+++ b/interpret.h
@@ -268,7 +268,7 @@ uninitialized_scalar:
                                        r = r->var_value;
                        }
 
-                       if (r->type == Node_val)
+                       if (r->type == Node_val || r->type == Node_typedregex)
                                UPREF(r);
                        PUSH(r);
                        break;
diff --git a/test/ChangeLog b/test/ChangeLog
index c9a8e30..8cc7915 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,8 +1,9 @@
 2015-06-29         Arnold D. Robbins     <address@hidden>
 
-       * Makefile.am (dbugeval2): New test.
+       * Makefile.am (dbugeval2, typedregex3): New tests.
        * dbugeval2.awk, dbugeval2.in, dbugeval2.ok: New files.
-       Thanks to Hermann Peifer for the report.
+       * typedregex3.awk, typedregex3.ok: New files.
+       Thanks to Hermann Peifer for the reports.
 
 2015-06-28         Arnold D. Robbins     <address@hidden>
 
diff --git a/test/Makefile.am b/test/Makefile.am
index f646bc0..b9e1446 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -994,6 +994,8 @@ EXTRA_DIST = \
        typedregex1.ok \
        typedregex2.awk \
        typedregex2.ok \
+       typedregex3.awk \
+       typedregex3.ok \
        typeof1.awk \
        typeof1.ok \
        typeof2.awk \
@@ -1117,7 +1119,7 @@ GAWK_EXT_TESTS = \
        splitarg4 strftime \
        strtonum switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \
        symtab7 symtab8 symtab9 \
-       typedregex1 typedregex2 typeof1 typeof2 typeof3 typeof4
+       typedregex1 typedregex2 typedregex3 typeof1 typeof2 typeof3 typeof4
        timeout
 
 EXTRA_TESTS = inftest regtest
diff --git a/test/Makefile.in b/test/Makefile.in
index 981b637..0ae5191 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1251,6 +1251,8 @@ EXTRA_DIST = \
        typedregex1.ok \
        typedregex2.awk \
        typedregex2.ok \
+       typedregex3.awk \
+       typedregex3.ok \
        typeof1.awk \
        typeof1.ok \
        typeof2.awk \
@@ -1373,7 +1375,7 @@ GAWK_EXT_TESTS = \
        splitarg4 strftime \
        strtonum switch2 symtab1 symtab2 symtab3 symtab4 symtab5 symtab6 \
        symtab7 symtab8 symtab9 \
-       typedregex1 typedregex2 typeof1 typeof2 typeof3 typeof4
+       typedregex1 typedregex2 typedregex3 typeof1 typeof2 typeof3 typeof4
 
 EXTRA_TESTS = inftest regtest
 INET_TESTS = inetdayu inetdayt inetechu inetecht
@@ -3938,6 +3940,11 @@ typedregex2:
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
+typedregex3:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
 typeof1:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index 462128e..f9dee6d 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1342,6 +1342,11 @@ typedregex2:
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
+typedregex3:
+       @echo $@
+       @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
 typeof1:
        @echo $@
        @AWKPATH="$(srcdir)" $(AWK) -f address@hidden  >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@
diff --git a/test/typedregex3.awk b/test/typedregex3.awk
new file mode 100644
index 0000000..ee6bcb6
--- /dev/null
+++ b/test/typedregex3.awk
@@ -0,0 +1,11 @@
+BEGIN {
+       a[1] = @/abc/
+       b[1][2][3] = @/xyz/
+       print typeof(a[1]), typeof(b[1][2][3])
+       print a[1], b[1][2][3]
+
+       a[1]++
+       b[1][2][3] ""
+       print typeof(a[1]), typeof(b[1][2][3])
+       print a[1], b[1][2][3]
+}
diff --git a/test/typedregex3.ok b/test/typedregex3.ok
new file mode 100644
index 0000000..9f8b881
--- /dev/null
+++ b/test/typedregex3.ok
@@ -0,0 +1,4 @@
+regexp regexp
+abc xyz
+number regexp
+1 xyz

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog            |    2 ++
 interpret.h          |    2 +-
 test/ChangeLog       |    5 +++--
 test/Makefile.am     |    4 +++-
 test/Makefile.in     |    9 ++++++++-
 test/Maketests       |    5 +++++
 test/typedregex3.awk |   11 +++++++++++
 test/typedregex3.ok  |    4 ++++
 8 files changed, 37 insertions(+), 5 deletions(-)
 create mode 100644 test/typedregex3.awk
 create mode 100644 test/typedregex3.ok


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]