Branch: Tag:

2014-05-22

2014-05-22 17:28:14 by Per Hedbor <ph@opera.com>

Fixed the intp() function in Gmp.mpz

1017:    }   }    - /*! @decl int(0..1) _is_type(string type) + /* protected int(0..1) _is_type(string type)    */   static void mpzmod__is_type(INT32 args)   {    struct pike_string *int_t; -  struct pike_string *str; +  int is_int;    MAKE_CONST_STRING(int_t,"int"); -  get_all_args( "Gmp.mpz->_is_type", args, "%s", &str ); -  pop_n_elems(args); /* even if str is freed here the comparison is OK. */ -  push_int( str == int_t ? 1 : 0 ); +  is_int = Pike_sp[-1].u.string == int_t ? 1 : 0; +  pop_stack(); +  push_int( is_int );   }      /*! @decl int(0..) size(void|int base)