summaryrefslogtreecommitdiffstats
path: root/tests/gpgscm/opdefines.h
diff options
context:
space:
mode:
authorJustus Winter <justus@g10code.com>2017-04-04 12:02:54 +0200
committerJustus Winter <justus@g10code.com>2017-04-10 14:57:28 +0200
commite1bb9326dc381ae2711a81ab621e21a66388bcbd (patch)
treeb305acb45ad64641cbaa1c03b2416b9eb4db7c22 /tests/gpgscm/opdefines.h
parentgpgscm: Deduplicate code. (diff)
downloadgnupg2-e1bb9326dc381ae2711a81ab621e21a66388bcbd.tar.xz
gnupg2-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 <justus@g10code.com>
Diffstat (limited to 'tests/gpgscm/opdefines.h')
-rw-r--r--tests/gpgscm/opdefines.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/gpgscm/opdefines.h b/tests/gpgscm/opdefines.h
index bee2b6d1f..dd32d1e71 100644
--- a/tests/gpgscm/opdefines.h
+++ b/tests/gpgscm/opdefines.h
@@ -147,6 +147,7 @@ _OP_DEF("newline", 0, 1, TST_OUTPORT,
_OP_DEF("error", 1, INF_ARG, TST_NONE, OP_ERR0 )
_OP_DEF(0, 0, 0, 0, OP_ERR1 )
_OP_DEF("reverse", 1, 1, TST_LIST, OP_REVERSE )
+_OP_DEF("reverse!", 1, 1, TST_LIST, OP_REVERSE_IN_PLACE )
_OP_DEF("list*", 1, INF_ARG, TST_NONE, OP_LIST_STAR )
_OP_DEF("append", 0, INF_ARG, TST_NONE, OP_APPEND )
#if USE_PLIST