mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +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:
parent
3e91019a92
commit
e1bb9326dc
3 changed files with 8 additions and 4 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue