Branch: Tag:

2014-10-30

2014-10-30 02:16:03 by Martin Nilsson <nilsson@opera.com>

Less AUTO_BIGNUM

860:   LONGEST pgtk2_get_int(struct svalue *s) {    if (TYPEOF(*s) == PIKE_T_INT)    return s->u.integer; - #ifdef AUTO_BIGNUM +     if (is_bignum_object_in_svalue(s)) {    LONGEST res;    int64_from_bignum(&res,s->u.object);    return res;    } - #endif +     if (TYPEOF(*s) == PIKE_T_FLOAT)    return (LONGEST)s->u.float_number;    return 0;
874:      int pgtk2_is_int(struct svalue *s) {    return ((TYPEOF(*s) == PIKE_T_INT) || -  (TYPEOF(*s) == PIKE_T_FLOAT) - #ifdef AUTO_BIGNUM -  || is_bignum_object_in_svalue(s) - #endif -  ); +  (TYPEOF(*s) == PIKE_T_FLOAT) || +  is_bignum_object_in_svalue(s));   }      /* double should be enough */
887:    return s->u.float_number;    if (TYPEOF(*s) == PIKE_T_INT)    return (double)s->u.integer; - #ifdef AUTO_BIGNUM +     if (is_bignum_object_in_svalue(s)) {    FLOAT_TYPE f;    ref_push_type_value(float_type_string);
897: Inside #if defined(AUTO_BIGNUM)
   pop_stack();    return (double)f;    } - #endif +     return 0.0;   }   
907:      int pgtk2_is_float(struct svalue *s) {    return ((TYPEOF(*s) == PIKE_T_FLOAT) || -  (TYPEOF(*s) == PIKE_T_INT) - #ifdef AUTO_BIGNUM -  || is_bignum_object_in_svalue(s) - #endif -  ); +  (TYPEOF(*s) == PIKE_T_INT) || +  is_bignum_object_in_svalue(s));   }      void pgtk2_set_property(GObject *g, char *prop, struct svalue *sv) {