1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

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>
This commit is contained in:
Justus Winter 2017-04-04 12:02:54 +02:00
parent 3e91019a92
commit e1bb9326dc
No known key found for this signature in database
GPG key ID: DD1A52F9DA8C9020
3 changed files with 8 additions and 4 deletions

View file

@ -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