[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] gawk branch, gawk-5.3-stable, updated. gawk-4.1.0-5590-g78bfad2c
From: |
Arnold Robbins |
Subject: |
[SCM] gawk branch, gawk-5.3-stable, updated. gawk-4.1.0-5590-g78bfad2c |
Date: |
Mon, 6 Jan 2025 08:04:09 -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 78bfad2ca1cc451b05abe0f1e7aa25d3a1101eb2 (commit)
from aae09361325903b2e4519e81e1218f593eb70792 (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=78bfad2ca1cc451b05abe0f1e7aa25d3a1101eb2
commit 78bfad2ca1cc451b05abe0f1e7aa25d3a1101eb2
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Mon Jan 6 15:03:45 2025 +0200
Fix a bug with typeof.
diff --git a/ChangeLog b/ChangeLog
index 787de2c7..542e7e6d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-01-06 Arnold D. Robbins <arnold@skeeve.com>
+
+ * builtin.c (do_typeof): Handle Node_param_list. Thanks to
+ Thanks to Denis Shirokov <cosmogen@gmail.com> for the report and
+ test case.
+
2025-01-02 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated. Copyright year updated, too.
diff --git a/builtin.c b/builtin.c
index f03ba701..491c6d54 100644
--- a/builtin.c
+++ b/builtin.c
@@ -3,7 +3,7 @@
*/
/*
- * Copyright (C) 1986, 1988, 1989, 1991-2024,
+ * Copyright (C) 1986, 1988, 1989, 1991-2025,
* the Free Software Foundation, Inc.
*
* This file is part of GAWK, the GNU implementation of the
@@ -3113,6 +3113,10 @@ do_typeof(int nargs)
else
dbg = NULL;
arg = POP();
+
+ if (arg->type == Node_param_list)
+ arg = GET_PARAM(arg->param_cnt);
+
switch (arg->type) {
case Node_var_array:
/* Node_var_array is never UPREF'ed */
diff --git a/pc/ChangeLog b/pc/ChangeLog
index 85a1810f..3780821a 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,7 @@
+2025-01-06 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.tst: Regenerated.
+
2024-10-25 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.tst: Regenerated.
diff --git a/pc/Makefile.tst b/pc/Makefile.tst
index a32b84f9..a47d1b47 100644
--- a/pc/Makefile.tst
+++ b/pc/Makefile.tst
@@ -224,7 +224,7 @@ GAWK_EXT_TESTS = \
symtab11 symtab12 timeout typedregex1 typedregex2 typedregex3 \
typedregex4 typedregex5 typedregex6 typeof1 typeof2 typeof3 \
delmessy \
- typeof4 typeof5 typeof6 typeof7 typeof8 unicode1 watchpoint1
+ typeof4 typeof5 typeof6 typeof7 typeof8 typeof9 unicode1 watchpoint1
ARRAYDEBUG_TESTS = arrdbg
EXTRA_TESTS = inftest regtest ignrcas3
@@ -3699,6 +3699,11 @@ typeof8:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+typeof9:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
unicode1:
@echo $@ $(ZOS_FAIL)
@echo Expect $@ to fail with MinGW.
diff --git a/test/ChangeLog b/test/ChangeLog
index fedb6c2d..88bcd04f 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2025-01-06 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (EXTRADIST): New test, typeof9.
+ * typeof9.awk, typeof9.ok: New files.
+
2024-10-25 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (diffout): Use ${PAGER:-more} instead of
diff --git a/test/Makefile.am b/test/Makefile.am
index b2e5a728..1c340504 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,7 +1,7 @@
#
# test/Makefile.am --- automake input file for gawk
#
-# Copyright (C) 1988-2024 the Free Software Foundation, Inc.
+# Copyright (C) 1988-2025 the Free Software Foundation, Inc.
#
# This file is part of GAWK, the GNU implementation of the
# AWK Programming Language.
@@ -1464,6 +1464,8 @@ EXTRA_DIST = \
typeof7.ok \
typeof8.awk \
typeof8.ok \
+ typeof9.awk \
+ typeof9.ok \
unicode1.awk \
unicode1.ok \
uninit2.awk \
@@ -1602,7 +1604,7 @@ GAWK_EXT_TESTS = \
symtab11 symtab12 timeout typedregex1 typedregex2 typedregex3 \
typedregex4 typedregex5 typedregex6 typeof1 typeof2 typeof3 \
delmessy \
- typeof4 typeof5 typeof6 typeof7 typeof8 unicode1 watchpoint1
+ typeof4 typeof5 typeof6 typeof7 typeof8 typeof9 unicode1 watchpoint1
ARRAYDEBUG_TESTS = arrdbg
diff --git a/test/Makefile.in b/test/Makefile.in
index 9dcfc905..e3472920 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -17,7 +17,7 @@
#
# test/Makefile.am --- automake input file for gawk
#
-# Copyright (C) 1988-2024 the Free Software Foundation, Inc.
+# Copyright (C) 1988-2025 the Free Software Foundation, Inc.
#
# This file is part of GAWK, the GNU implementation of the
# AWK Programming Language.
@@ -1728,6 +1728,8 @@ EXTRA_DIST = \
typeof7.ok \
typeof8.awk \
typeof8.ok \
+ typeof9.awk \
+ typeof9.ok \
unicode1.awk \
unicode1.ok \
uninit2.awk \
@@ -1866,7 +1868,7 @@ GAWK_EXT_TESTS = \
symtab11 symtab12 timeout typedregex1 typedregex2 typedregex3 \
typedregex4 typedregex5 typedregex6 typeof1 typeof2 typeof3 \
delmessy \
- typeof4 typeof5 typeof6 typeof7 typeof8 unicode1 watchpoint1
+ typeof4 typeof5 typeof6 typeof7 typeof8 typeof9 unicode1 watchpoint1
ARRAYDEBUG_TESTS = arrdbg
EXTRA_TESTS = inftest regtest ignrcas3
@@ -5519,6 +5521,11 @@ typeof8:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+typeof9:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
unicode1:
@echo $@ $(ZOS_FAIL)
@-[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; export GAWKLOCALE; \
diff --git a/test/Maketests b/test/Maketests
index 9236de5b..0137744e 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -2377,6 +2377,11 @@ typeof8:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+typeof9:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE:
$$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
unicode1:
@echo $@ $(ZOS_FAIL)
@-[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; export GAWKLOCALE; \
diff --git a/test/typeof9.awk b/test/typeof9.awk
new file mode 100644
index 00000000..689209a6
--- /dev/null
+++ b/test/typeof9.awk
@@ -0,0 +1,11 @@
+func _typeof( p ,f ) {
+ f = "awk::typeof"
+ return @f( p ) }
+
+BEGIN{
+
+ f = "awk::typeof"
+ print "typeof: " @f( p )
+
+ print "_typeof: " _typeof( p )
+ }
diff --git a/test/typeof9.ok b/test/typeof9.ok
new file mode 100644
index 00000000..cd60072e
--- /dev/null
+++ b/test/typeof9.ok
@@ -0,0 +1,2 @@
+typeof: untyped
+_typeof: untyped
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
builtin.c | 6 +++++-
pc/ChangeLog | 4 ++++
pc/Makefile.tst | 7 ++++++-
test/ChangeLog | 5 +++++
test/Makefile.am | 6 ++++--
test/Makefile.in | 11 +++++++++--
test/Maketests | 5 +++++
test/typeof9.awk | 11 +++++++++++
test/typeof9.ok | 2 ++
10 files changed, 57 insertions(+), 6 deletions(-)
create mode 100644 test/typeof9.awk
create mode 100644 test/typeof9.ok
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] gawk branch, gawk-5.3-stable, updated. gawk-4.1.0-5590-g78bfad2c,
Arnold Robbins <=