[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-656
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-656-ga830a63 |
Date: |
Tue, 14 Apr 2015 12:02:54 +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 a830a63718f1e9a0a812e772bef6e891668afd17 (commit)
from 3de71423b3a39be0b9536413321c953cbf99b119 (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=a830a63718f1e9a0a812e772bef6e891668afd17
commit a830a63718f1e9a0a812e772bef6e891668afd17
Author: Arnold D. Robbins <address@hidden>
Date: Tue Apr 14 15:02:27 2015 +0300
Make indirect call of gensub with 3 args work.
diff --git a/ChangeLog b/ChangeLog
index f7b45d9..2a99f37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@
to an unsigned time_t. Thanks again to Glaudiston Gomes da Silva
<address@hidden>.
+ Unrelated:
+ * builtin.c (call_sub): Fix for indirect gensub, 3 args now works.
+
2015-04-13 Arnold D. Robbins <address@hidden>
* regcomp.c (analyze): Prevent malloc(0).
diff --git a/builtin.c b/builtin.c
index a7853d7..f650a9f 100644
--- a/builtin.c
+++ b/builtin.c
@@ -3063,10 +3063,10 @@ call_sub(const char *name, int nargs)
PUSH(rhs);
nargs++;
}
- PUSH(rhs);
+ else
+ PUSH(rhs);
}
-
unref(zero);
result = do_sub(nargs, flags);
if (flags != GENSUB)
diff --git a/test/ChangeLog b/test/ChangeLog
index 0092932..201f8a3 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-14 Arnold D. Robbins <address@hidden>
+
+ * indirectbuiltin.awk: Add another test (gensub 3 args).
+ * indirectbuiltin.ok: Update good results.
+
2015-04-13 Arnold D. Robbins <address@hidden>
* Makefile.am (negtime): New test.
diff --git a/test/indirectbuiltin.awk b/test/indirectbuiltin.awk
index 4d5291d..c9e7521 100644
--- a/test/indirectbuiltin.awk
+++ b/test/indirectbuiltin.awk
@@ -98,6 +98,12 @@ BEGIN {
i1 = @fun("f", "q", "g", "ff11bb")
print_result("string", fun, b1, i1)
+ fun = "gensub"
+ $0 = "ff11bb"
+ b1 = gensub("f", "q", "g")
+ i1 = @fun("f", "q", "g")
+ print_result("string", fun " (3 args)", b1, i1)
+
fun = "gsub"
$0 = "ff11bb"
b1 = gsub("f", "q")
diff --git a/test/indirectbuiltin.ok b/test/indirectbuiltin.ok
index 312bbd7..08c8761 100644
--- a/test/indirectbuiltin.ok
+++ b/test/indirectbuiltin.ok
@@ -14,6 +14,7 @@ math: sqrt: pass
math: srand: pass
math: xor: pass
string: gensub: pass
+string: gensub (3 args): pass
string: gsub: pass
string: index: pass
string: dcgettext: pass
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 3 +++
builtin.c | 4 ++--
test/ChangeLog | 5 +++++
test/indirectbuiltin.awk | 6 ++++++
test/indirectbuiltin.ok | 1 +
5 files changed, 17 insertions(+), 2 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-656-ga830a63,
Arnold Robbins <=