gimp r24743 - in branches/gimp-2-4: . plug-ins/script-fu/tinyscheme



Author: kcozens
Date: Tue Jan 29 16:37:40 2008
New Revision: 24743
URL: http://svn.gnome.org/viewvc/gimp?rev=24743&view=rev

Log:
2008-01-29  Kevin Cozens  <kcozens cvs gnome org>

	* plug-ins/script-fu/tinyscheme/scheme.c: Reverted changes that
	prevent a seg fault due to bad syntax in LET*, LET, and LETREC.
	The change enforced R5RS syntax breaking scripts that used bad
	syntax (missing values) when they were updated to GIMP 2.4.


Modified:
   branches/gimp-2-4/ChangeLog
   branches/gimp-2-4/plug-ins/script-fu/tinyscheme/scheme.c

Modified: branches/gimp-2-4/plug-ins/script-fu/tinyscheme/scheme.c
==============================================================================
--- branches/gimp-2-4/plug-ins/script-fu/tinyscheme/scheme.c	(original)
+++ branches/gimp-2-4/plug-ins/script-fu/tinyscheme/scheme.c	Tue Jan 29 16:37:40 2008
@@ -287,7 +287,6 @@
 #define cddr(p)          cdr(cdr(p))
 #define cadar(p)         car(cdr(car(p)))
 #define caddr(p)         car(cdr(cdr(p)))
-#define cdaar(p)         cdr(car(car(p)))
 #define cadaar(p)        car(cdr(car(car(p))))
 #define cadddr(p)        car(cdr(cdr(cdr(p))))
 #define cddddr(p)        cdr(cdr(cdr(cdr(p))))
@@ -2760,9 +2759,6 @@
      case OP_LET1:       /* let (calculate parameters) */
           sc->args = cons(sc, sc->value, sc->args);
           if (is_pair(sc->code)) { /* continue */
-               if (!is_pair(car(sc->code)) || !is_pair(cdar(sc->code))) {
-                    Error_1(sc,"Bad syntax of binding spec in let :",car(sc->code));
-               }
                s_save(sc,OP_LET1, sc->args, cdr(sc->code));
                sc->code = cadar(sc->code);
                sc->args = sc->NIL;
@@ -2801,9 +2797,6 @@
                sc->code = cdr(sc->code);
                s_goto(sc,OP_BEGIN);
           }
-          if(!is_pair(car(sc->code)) || !is_pair(caar(sc->code)) || !is_pair(cdaar(sc->code))) {
-               Error_1(sc,"Bad syntax of binding spec in let* :",car(sc->code));
-          }
           s_save(sc,OP_LET1AST, cdr(sc->code), car(sc->code));
           sc->code = cadaar(sc->code);
           s_goto(sc,OP_EVAL);
@@ -2846,9 +2839,6 @@
      case OP_LET1REC:    /* letrec (calculate parameters) */
           sc->args = cons(sc, sc->value, sc->args);
           if (is_pair(sc->code)) { /* continue */
-               if (!is_pair(car(sc->code)) || !is_pair(cdar(sc->code))) {
-                    Error_1(sc,"Bad syntax of binding spec in letrec :",car(sc->code));
-               }
                s_save(sc,OP_LET1REC, sc->args, cdr(sc->code));
                sc->code = cadar(sc->code);
                sc->args = sc->NIL;



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