summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJustus Winter <justus@g10code.com>2016-11-18 12:51:00 +0100
committerJustus Winter <justus@g10code.com>2016-11-22 12:09:47 +0100
commita3b258d1d15953816e0567511ecc527a4ccdd626 (patch)
treeaa02462bd1ce9757a7762bdb6fe1557cfe3c9178 /tests
parentgpgscm: Fix property lists. (diff)
downloadgnupg2-a3b258d1d15953816e0567511ecc527a4ccdd626.tar.xz
gnupg2-a3b258d1d15953816e0567511ecc527a4ccdd626.zip
gpgscm: Refactor.
* tests/gpgscm/scheme.c (opexe_0): Reduce code duplication. Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/gpgscm/scheme.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
index 4a83cd5a0..e011deaba 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);