mirror of https://github.com/GNOME/gimp.git
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.
This commit is contained in:
parent
eb04265ce3
commit
8a8e8c6fad
|
@ -3783,14 +3783,7 @@ static pointer opexe_3(scheme *sc, enum scheme_opcodes op) {
|
||||||
case OP_STRINGP: /* string? */
|
case OP_STRINGP: /* string? */
|
||||||
s_retbool(is_string(car(sc->args)));
|
s_retbool(is_string(car(sc->args)));
|
||||||
case OP_INTEGERP: /* integer? */
|
case OP_INTEGERP: /* integer? */
|
||||||
x = car(sc->args);
|
s_retbool(is_integer(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));
|
|
||||||
case OP_REALP: /* real? */
|
case OP_REALP: /* real? */
|
||||||
s_retbool(is_number(car(sc->args))); /* All numbers are real */
|
s_retbool(is_number(car(sc->args))); /* All numbers are real */
|
||||||
case OP_CHARP: /* char? */
|
case OP_CHARP: /* char? */
|
||||||
|
@ -4273,7 +4266,8 @@ static pointer opexe_5(scheme *sc, enum scheme_opcodes op) {
|
||||||
{ s_return(sc,sc->EOF_OBJ); }
|
{ s_return(sc,sc->EOF_OBJ); }
|
||||||
else if (sc->tok == TOK_RPAREN) {
|
else if (sc->tok == TOK_RPAREN) {
|
||||||
gunichar c = inchar(sc);
|
gunichar c = inchar(sc);
|
||||||
if (c != '\n') backchar(sc,c);
|
if (c != '\n')
|
||||||
|
backchar(sc,c);
|
||||||
sc->nesting_stack[sc->file_i]--;
|
sc->nesting_stack[sc->file_i]--;
|
||||||
s_return(sc,reverse_in_place(sc, sc->NIL, sc->args));
|
s_return(sc,reverse_in_place(sc, sc->NIL, sc->args));
|
||||||
} else if (sc->tok == TOK_DOT) {
|
} else if (sc->tok == TOK_DOT) {
|
||||||
|
|
Loading…
Reference in New Issue