gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, feature/fixtype, updated. gawk-4.1.0-186


From: Andrew J. Schorr
Subject: [gawk-diffs] [SCM] gawk branch, feature/fixtype, updated. gawk-4.1.0-1861-g2b0495a
Date: Mon, 27 Jun 2016 00:52:52 +0000 (UTC)

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, feature/fixtype has been updated
       via  2b0495afae3d744127f3b6c18e98819feafbface (commit)
      from  41785b1a222d34f4e0e0a3ab4fd15f94f988ca39 (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=2b0495afae3d744127f3b6c18e98819feafbface

commit 2b0495afae3d744127f3b6c18e98819feafbface
Author: Andrew J. Schorr <address@hidden>
Date:   Sun Jun 26 20:52:14 2016 -0400

    Simplify do_print logic to eliminate an unnecessary test for the value's 
type.

diff --git a/ChangeLog b/ChangeLog
index 82a688f..0aa7812 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2016-06-26         Andrew J. Schorr     <address@hidden>
 
+       * builtin.c (do_print): There's actually no reason to test whether a
+       value is a number, since the STRCUR flag and stfmt value contain all
+       the necessary info, as in awk.h:force_string.
+
+2016-06-26         Andrew J. Schorr     <address@hidden>
+
        * builtin.c (do_print): Do not use OFMT to print strnum values. We
        accomplish this by calling format_val for a NUMBER only
        if there is no string currently available, or if stfmt equals
diff --git a/builtin.c b/builtin.c
index a0b6e79..24f585e 100644
--- a/builtin.c
+++ b/builtin.c
@@ -2203,8 +2203,7 @@ do_print(int nargs, int redirtype)
 
                if (tmp->type == Node_typedregex)
                        args_array[i] = force_string(tmp);
-               else if ((fixtype(tmp)->flags & (NUMBER|STRING)) == NUMBER &&
-                        !((tmp->flags & STRCUR) != 0
+               else if (!((tmp->flags & STRCUR) != 0
                                && (tmp->stfmt == -1 || tmp->stfmt == OFMTidx)))
                        args_array[i] = format_val(OFMT, OFMTidx, tmp);
        }

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

Summary of changes:
 ChangeLog |    6 ++++++
 builtin.c |    3 +--
 2 files changed, 7 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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