[Pkg-gnupg-commit] [gnupg2] 22/180: gpgscm: Make 'reverse' compatible with 'reverse_in_place'.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Sat Dec 24 22:29:03 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit 005d326d19ba28005182205f25edc4f7499ec0b5
Author: Justus Winter <justus at g10code.com>
Date:   Wed Nov 23 12:27:41 2016 +0100

    gpgscm: Make 'reverse' compatible with 'reverse_in_place'.
    
    * tests/gpgscm/scheme.c (reverse): Update prototype, add terminator
    argument.
    (opexe_4): Update callsite.
    
    Signed-off-by: Justus Winter <justus at g10code.com>
---
 tests/gpgscm/scheme.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
index d088931..8666548 100644
--- a/tests/gpgscm/scheme.c
+++ b/tests/gpgscm/scheme.c
@@ -409,7 +409,7 @@ static void printatom(scheme *sc, pointer l, int f);
 static pointer mk_proc(scheme *sc, enum scheme_opcodes op);
 static pointer mk_closure(scheme *sc, pointer c, pointer e);
 static pointer mk_continuation(scheme *sc, pointer d);
-static pointer reverse(scheme *sc, pointer a);
+static pointer reverse(scheme *sc, pointer term, pointer list);
 static pointer reverse_in_place(scheme *sc, pointer term, pointer list);
 static pointer revappend(scheme *sc, pointer a, pointer b);
 static void dump_stack_mark(scheme *);
@@ -2356,9 +2356,9 @@ static pointer list_star(scheme *sc, pointer d) {
 }
 
 /* reverse list -- produce new list */
-static pointer reverse(scheme *sc, pointer a) {
+static pointer reverse(scheme *sc, pointer term, pointer list) {
 /* a must be checked by gc */
-     pointer p = sc->NIL;
+     pointer a = list, p = term;
 
      for ( ; is_pair(a); a = cdr(a)) {
           p = cons(sc, car(a), p);
@@ -4148,7 +4148,7 @@ static pointer opexe_4(scheme *sc, enum scheme_opcodes op) {
           }
 
      CASE(OP_REVERSE):   /* reverse */
-          s_return(sc,reverse(sc, car(sc->args)));
+          s_return(sc,reverse(sc, sc->NIL, car(sc->args)));
 
      CASE(OP_LIST_STAR): /* list* */
           s_return(sc,list_star(sc,sc->args));

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list