[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] gawk branch, gawk-5.3-stable, updated. gawk-4.1.0-5592-g5f6923cc
From: |
Arnold Robbins |
Subject: |
[SCM] gawk branch, gawk-5.3-stable, updated. gawk-4.1.0-5592-g5f6923cc |
Date: |
Tue, 7 Jan 2025 04:48:53 -0500 (EST) |
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-5.3-stable has been updated
via 5f6923cc4cb91ef3847ea7cceccccd566668d762 (commit)
via 4588ad15574be596fe23cb1d05201430af76503d (commit)
from 78bfad2ca1cc451b05abe0f1e7aa25d3a1101eb2 (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=5f6923cc4cb91ef3847ea7cceccccd566668d762
commit 5f6923cc4cb91ef3847ea7cceccccd566668d762
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Tue Jan 7 11:23:35 2025 +0200
Additional fix in do_typeof.
diff --git a/ChangeLog b/ChangeLog
index ad402e83..220692f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,10 @@
2025-01-07 Arnold D. Robbins <arnold@skeeve.com>
- * builtin.c (do_isarray): Handle Node_param_list also. Thanks to
- Cristian Ioneci <mekanofox@astropostale.com> for the report and
- test case.
+ Thanks to Cristian Ioneci <mekanofox@astropostale.com> for the
+ report and test case and fixes for these.
+
+ * builtin.c (do_isarray): Handle Node_param_list also.
+ (do_typeof): Additional checking for passed-in array.
2025-01-06 Arnold D. Robbins <arnold@skeeve.com>
diff --git a/builtin.c b/builtin.c
index 810aa01c..adb5c0fb 100644
--- a/builtin.c
+++ b/builtin.c
@@ -3122,8 +3122,12 @@ do_typeof(int nargs)
dbg = NULL;
arg = POP();
- if (arg->type == Node_param_list)
+ if (arg->type == Node_param_list) {
arg = GET_PARAM(arg->param_cnt);
+ if (arg->type == Node_array_ref) {
+ arg = arg->orig_array;
+ }
+ }
switch (arg->type) {
case Node_var_array:
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=4588ad15574be596fe23cb1d05201430af76503d
commit 4588ad15574be596fe23cb1d05201430af76503d
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Tue Jan 7 11:18:20 2025 +0200
Fix for isarray and new test.
diff --git a/ChangeLog b/ChangeLog
index 542e7e6d..ad402e83 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-01-07 Arnold D. Robbins <arnold@skeeve.com>
+
+ * builtin.c (do_isarray): Handle Node_param_list also. Thanks to
+ Cristian Ioneci <mekanofox@astropostale.com> for the report and
+ test case.
+
2025-01-06 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (do_typeof): Handle Node_param_list. Thanks to
diff --git a/builtin.c b/builtin.c
index 491c6d54..810aa01c 100644
--- a/builtin.c
+++ b/builtin.c
@@ -559,6 +559,14 @@ do_isarray(int nargs)
check_exact_args(nargs, "isarray", 1);
tmp = POP();
+
+ if (tmp->type == Node_param_list) {
+ tmp = GET_PARAM(tmp->param_cnt);
+ if (tmp->type == Node_array_ref) {
+ tmp = tmp->orig_array;
+ }
+ }
+
if (tmp->type != Node_var_array) {
ret = 0;
// could be Node_var_new
diff --git a/pc/ChangeLog b/pc/ChangeLog
index 3780821a..0c3503f5 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,7 @@
+2025-01-07 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.tst: Regenerated.
+
2025-01-06 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.tst: Regenerated.
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index a47d1b47..0c89f2ad 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -223,7 +223,7 @@ GAWK_EXT_TESTS = \
symtab3 symtab4 symtab5 symtab6 symtab7 symtab8 symtab9 symtab10 \
symtab11 symtab12 timeout typedregex1 typedregex2 typedregex3 \
typedregex4 typedregex5 typedregex6 typeof1 typeof2 typeof3 \
- delmessy \
+ delmessy indirectbuiltin3 \
typeof4 typeof5 typeof6 typeof7 typeof8 typeof9 unicode1 watchpoint1
ARRAYDEBUG_TESTS = arrdbg
@@ -3674,6 +3674,11 @@ delmessy:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+indirectbuiltin3:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
typeof4:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
diff --git a/test/ChangeLog b/test/ChangeLog
index 88bcd04f..a54baf04 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2025-01-07 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (EXTRADIST): New test, indirectbuiltin3.
+ * indirectbuiltin3.awk, indirectbuiltin3.ok: New files.
+
2025-01-06 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (EXTRADIST): New test, typeof9.
diff --git a/test/Makefile.am b/test/Makefile.am
index 1c340504..a3a72456 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -629,6 +629,8 @@ EXTRA_DIST = \
indirectbuiltin.ok \
indirectbuiltin2.awk \
indirectbuiltin2.ok \
+ indirectbuiltin3.awk \
+ indirectbuiltin3.ok \
indirectcall2.awk \
indirectcall2.ok \
indirectcall3.awk \
@@ -1603,7 +1605,7 @@ GAWK_EXT_TESTS = \
symtab3 symtab4 symtab5 symtab6 symtab7 symtab8 symtab9 symtab10 \
symtab11 symtab12 timeout typedregex1 typedregex2 typedregex3 \
typedregex4 typedregex5 typedregex6 typeof1 typeof2 typeof3 \
- delmessy \
+ delmessy indirectbuiltin3 \
typeof4 typeof5 typeof6 typeof7 typeof8 typeof9 unicode1 watchpoint1
ARRAYDEBUG_TESTS = arrdbg
diff --git a/test/Makefile.in b/test/Makefile.in
index e3472920..668f8e94 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -893,6 +893,8 @@ EXTRA_DIST = \
indirectbuiltin.ok \
indirectbuiltin2.awk \
indirectbuiltin2.ok \
+ indirectbuiltin3.awk \
+ indirectbuiltin3.ok \
indirectcall2.awk \
indirectcall2.ok \
indirectcall3.awk \
@@ -1867,7 +1869,7 @@ GAWK_EXT_TESTS = \
symtab3 symtab4 symtab5 symtab6 symtab7 symtab8 symtab9 symtab10 \
symtab11 symtab12 timeout typedregex1 typedregex2 typedregex3 \
typedregex4 typedregex5 typedregex6 typeof1 typeof2 typeof3 \
- delmessy \
+ delmessy indirectbuiltin3 \
typeof4 typeof5 typeof6 typeof7 typeof8 typeof9 unicode1 watchpoint1
ARRAYDEBUG_TESTS = arrdbg
@@ -5496,6 +5498,11 @@ delmessy:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+indirectbuiltin3:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
typeof4:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index 0137744e..093fa5e7 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -2352,6 +2352,11 @@ delmessy:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+indirectbuiltin3:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
typeof4:
@echo $@
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
diff --git a/test/indirectbuiltin3.awk b/test/indirectbuiltin3.awk
new file mode 100644
index 00000000..ca273acc
--- /dev/null
+++ b/test/indirectbuiltin3.awk
@@ -0,0 +1,10 @@
+function f(y, ifc)
+{
+ y[3] = 14
+ ifc = "isarray"
+ return @ifc(y)
+}
+
+BEGIN {
+ print f(z)
+}
diff --git a/test/indirectbuiltin3.ok b/test/indirectbuiltin3.ok
new file mode 100644
index 00000000..d00491fd
--- /dev/null
+++ b/test/indirectbuiltin3.ok
@@ -0,0 +1 @@
+1
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
builtin.c | 14 +++++++++++++-
pc/ChangeLog | 4 ++++
pc/Makefile.tst | 7 ++++++-
test/ChangeLog | 5 +++++
test/Makefile.am | 4 +++-
test/Makefile.in | 9 ++++++++-
test/Maketests | 5 +++++
test/indirectbuiltin3.awk | 10 ++++++++++
test/{arrayprm3.ok => indirectbuiltin3.ok} | 0
10 files changed, 62 insertions(+), 4 deletions(-)
create mode 100644 test/indirectbuiltin3.awk
copy test/{arrayprm3.ok => indirectbuiltin3.ok} (100%)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] gawk branch, gawk-5.3-stable, updated. gawk-4.1.0-5592-g5f6923cc,
Arnold Robbins <=