Changeset 31414 in project


Ignore:
Timestamp:
09/12/14 21:43:10 (5 years ago)
Author:
sjamaan
Message:

numbers: Fix boolean types to be Scheme objects, not C "booleans"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/numbers/trunk/numbers-c.c

    r31413 r31414  
    23032303    /* This is the only case we need to go allocate a bignum for */
    23042304    C_word kab[C_SIZEOF_FIX_BIGNUM+C_SIZEOF_CLOSURE(9)], *ka = kab, k2, size,
    2305            q_negp = !(C_bignum_negativep(x)), /* We already know y < 0 */
    2306            r_negp = C_bignum_negativep(x);
     2305           q_negp = C_mk_bool(!(C_bignum_negativep(x))), /* We know y < 0 */
     2306           r_negp = C_mk_bool(C_bignum_negativep(x));
    23072307
    23082308    y = C_a_u_i_fix_to_big(&ka, C_fix(C_MOST_NEGATIVE_FIXNUM));
     
    23172317  } else {
    23182318    C_word kab[C_SIZEOF_FIX_BIGNUM+C_SIZEOF_CLOSURE(7)], *ka = kab, k2,
    2319            q_negp = (y < 0) ? !(C_bignum_negativep(x)) : C_bignum_negativep(x),
    2320            r_negp = C_bignum_negativep(x),
     2319           q_negp = C_mk_bool((y < 0) ?
     2320                              !(C_bignum_negativep(x)) :
     2321                              C_bignum_negativep(x)),
     2322           r_negp = C_mk_bool(C_bignum_negativep(x)),
    23212323           absy = (y < 0) ? -y : y,
    23222324           size, func;
     
    23482350{
    23492351  C_word kab[C_SIZEOF_FIX_BIGNUM+C_SIZEOF_CLOSURE(9)], *ka = kab, k2, size,
    2350          q_negp = C_bignum_negativep(y)
    2351                   ? !C_bignum_negativep(x)
    2352                   : C_bignum_negativep(x),
    2353          r_negp = C_bignum_negativep(x);
     2352         q_negp = C_mk_bool(C_bignum_negativep(y) ?
     2353                            !C_bignum_negativep(x) :
     2354                            C_bignum_negativep(x)),
     2355         r_negp = C_mk_bool(C_bignum_negativep(x));
    23542356
    23552357  switch(bignum_cmp_unsigned(x, y)) {
Note: See TracChangeset for help on using the changeset viewer.