[gimp] Applied changes from CVS version 1.23 of official version of TinyScheme.



commit 6a3a7befcf7ab4954d62f96263c6d9b3d8f88c9d
Author: Kevin Cozens <kcozens cvs gnome org>
Date:   Mon Aug 17 21:14:13 2009 -0400

    Applied changes from CVS version 1.23 of official version of TinyScheme.
    Fixed potential problem of arglist to foreign calls being wrongly GC'ed.

 plug-ins/script-fu/tinyscheme/scheme.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/script-fu/tinyscheme/scheme.c b/plug-ins/script-fu/tinyscheme/scheme.c
index 7df76b3..6acd360 100644
--- a/plug-ins/script-fu/tinyscheme/scheme.c
+++ b/plug-ins/script-fu/tinyscheme/scheme.c
@@ -2737,7 +2737,10 @@ static pointer opexe_0(scheme *sc, enum scheme_opcodes op) {
 #endif
           if (is_proc(sc->code)) {
                s_goto(sc,procnum(sc->code));   /* PROCEDURE */
-          } else if (is_foreign(sc->code)) {
+          } else if (is_foreign(sc->code))
+          {
+               /* Keep nested calls from GC'ing the arglist */
+               push_recent_alloc(sc,sc->args,sc->NIL);
                sc->foreign_error = sc->NIL;
                x=sc->code->_object._ff(sc,sc->args);
                if (sc->foreign_error == sc->NIL) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]