[gimp] Fixed OP_INTEGERP op-code to match version in Tinyscheme 1.40



commit 8a8e8c6fad2580805c5bba7331548f7ed5528c93
Author: Kevin Cozens <kcozens cvs gnome org>
Date:   Wed Jan 19 15:30:47 2011 -0500

    Fixed OP_INTEGERP op-code to match version in Tinyscheme 1.40
    
    I don't know how the original block of code got the way it was since it has
    been a single line of code in TinyScheme since the second revision. This also
    prevents the compile from breaking if the USE_MATH #define was ever set to 0.

 plug-ins/script-fu/tinyscheme/scheme.c |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/plug-ins/script-fu/tinyscheme/scheme.c b/plug-ins/script-fu/tinyscheme/scheme.c
index b46bb7a..387eb9c 100644
--- a/plug-ins/script-fu/tinyscheme/scheme.c
+++ b/plug-ins/script-fu/tinyscheme/scheme.c
@@ -3783,14 +3783,7 @@ static pointer opexe_3(scheme *sc, enum scheme_opcodes op) {
      case OP_STRINGP:     /* string? */
           s_retbool(is_string(car(sc->args)));
      case OP_INTEGERP:     /* integer? */
-          x = car(sc->args);
-          if (!is_number(x))
-               s_retbool(0);
-          if (is_real(x)) {
-               double r = rvalue(x);
-               s_retbool(r == round_per_R5RS(r));
-          }
-          s_retbool(is_integer(x));
+          s_retbool(is_integer(car(sc->args)));
      case OP_REALP:     /* real? */
           s_retbool(is_number(car(sc->args))); /* All numbers are real */
      case OP_CHARP:     /* char? */
@@ -4273,7 +4266,8 @@ static pointer opexe_5(scheme *sc, enum scheme_opcodes op) {
                { s_return(sc,sc->EOF_OBJ); }
           else if (sc->tok == TOK_RPAREN) {
                gunichar c = inchar(sc);
-               if (c != '\n') backchar(sc,c);
+               if (c != '\n')
+                 backchar(sc,c);
                sc->nesting_stack[sc->file_i]--;
                s_return(sc,reverse_in_place(sc, sc->NIL, sc->args));
           } else if (sc->tok == TOK_DOT) {



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