[git] GnuPG - branch, master, updated. gnupg-2.1.18-149-ge4583ae

by Justus Winter cvs at cvs.gnupg.org
Tue Feb 28 16:44:47 CET 2017


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 "The GNU Privacy Guard".

The branch, master has been updated
       via  e4583ae14e52482ab390c102d071755f91ab211d (commit)
       via  058c97f9fc485405246b1adfcc905c1891550652 (commit)
      from  d379a0174cca595204b32da9a66c513a1304e6d0 (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 -----------------------------------------------------------------
commit e4583ae14e52482ab390c102d071755f91ab211d
Author: Justus Winter <justus at g10code.com>
Date:   Tue Feb 28 16:19:18 2017 +0100

    gpgscm: Improve parsing.
    
    * tests/gpgscm/scheme.c (port_increment_current_line): Avoid creating
    the same integer if the delta is zero.  This happens a lot during
    parsing, and puts pressure on the memory allocator.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
index 0453754..b2ff721 100644
--- a/tests/gpgscm/scheme.c
+++ b/tests/gpgscm/scheme.c
@@ -1735,6 +1735,9 @@ port_clear_location (scheme *sc, port *p)
 static void
 port_increment_current_line (scheme *sc, port *p, long delta)
 {
+  if (delta == 0)
+    return;
+
   p->curr_line =
     mk_integer(sc, ivalue_unchecked(p->curr_line) + delta);
 }

commit 058c97f9fc485405246b1adfcc905c1891550652
Author: Justus Winter <justus at g10code.com>
Date:   Tue Feb 28 16:17:33 2017 +0100

    gpgscm: Fix calculating the line number.
    
    * tests/gpgscm/scheme.c (opexe_5): Only increment the line number on
    newlines.
    
    Fixes-commit: 7cc57e2c63d0fa97569736419db5c76117e7685b
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
index 405dee4..0453754 100644
--- a/tests/gpgscm/scheme.c
+++ b/tests/gpgscm/scheme.c
@@ -5045,8 +5045,8 @@ static pointer opexe_5(scheme *sc, enum scheme_opcodes op) {
                int c = inchar(sc);
                if (c != '\n')
                  backchar(sc,c);
-	       port_increment_current_line(sc,
-					   &sc->load_stack[sc->file_i], 1);
+	       else
+		 port_increment_current_line(sc, &sc->load_stack[sc->file_i], 1);
                sc->nesting_stack[sc->file_i]--;
                s_return(sc,reverse_in_place(sc, sc->NIL, sc->args));
           } else if (sc->tok == TOK_DOT) {

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

Summary of changes:
 tests/gpgscm/scheme.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list