aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpgscm/scheme.c
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-04-04 10:02:54 +0000
committerJustus Winter <[email protected]>2017-04-10 12:57:28 +0000
commite1bb9326dc381ae2711a81ab621e21a66388bcbd (patch)
treeb305acb45ad64641cbaa1c03b2416b9eb4db7c22 /tests/gpgscm/scheme.c
parentgpgscm: Deduplicate code. (diff)
downloadgnupg-e1bb9326dc381ae2711a81ab621e21a66388bcbd.tar.gz
gnupg-e1bb9326dc381ae2711a81ab621e21a66388bcbd.zip
gpgscm: Add and use opcode for reversing a list in place.
* tests/gpgscm/lib.scm (string-split-pln): Use 'reverse!'. (string-rtrim): Likewise. * tests/gpgscm/opdefines.h (reverse!): New opcode. * tests/gpgscm/scheme.c (opexe_0): Handle new opcode. Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'tests/gpgscm/scheme.c')
-rw-r--r--tests/gpgscm/scheme.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
index 655c24661..f3a99fde9 100644
--- a/tests/gpgscm/scheme.c
+++ b/tests/gpgscm/scheme.c
@@ -4682,6 +4682,9 @@ static pointer opexe_0(scheme *sc, enum scheme_opcodes op) {
CASE(OP_REVERSE): /* reverse */
s_return(sc,reverse(sc, sc->NIL, car(sc->args)));
+ CASE(OP_REVERSE_IN_PLACE): /* reverse! */
+ s_return(sc, reverse_in_place(sc, sc->NIL, car(sc->args)));
+
CASE(OP_LIST_STAR): /* list* */
s_return(sc,list_star(sc,sc->args));