[Pkg-gnupg-commit] [gnupg2] 15/180: gpgscm: Refactor.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Sat Dec 24 22:29:03 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit a3b258d1d15953816e0567511ecc527a4ccdd626
Author: Justus Winter <justus at g10code.com>
Date:   Fri Nov 18 12:51:00 2016 +0100

    gpgscm: Refactor.
    
    * tests/gpgscm/scheme.c (opexe_0): Reduce code duplication.
    
    Signed-off-by: Justus Winter <justus at g10code.com>
---
 tests/gpgscm/scheme.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
index 4a83cd5..e011dea 100644
--- a/tests/gpgscm/scheme.c
+++ b/tests/gpgscm/scheme.c
@@ -2963,16 +2963,16 @@ static pointer opexe_0(scheme *sc, enum scheme_opcodes op) {
                }
           }
 
-     CASE(OP_LAMBDA1):
-	  gc_disable(sc, 1);
-          s_return_enable_gc(sc, mk_closure(sc, sc->value, sc->envir));
-
 #else
      CASE(OP_LAMBDA):     /* lambda */
+	  sc->value = sc->code;
+	  /* Fallthrough. */
+#endif
+
+     CASE(OP_LAMBDA1):
 	  gc_disable(sc, 1);
-          s_return_enable_gc(sc, mk_closure(sc, sc->code, sc->envir));
+          s_return_enable_gc(sc, mk_closure(sc, sc->value, sc->envir));
 
-#endif
 
      CASE(OP_MKCLOSURE): /* make-closure */
        x=car(sc->args);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list