pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:3297:    PCHARP str_start;       unsigned INT_TYPE val, mul_limit;    int c;    int xx, neg = 0, add_limit, overflow = 0;       maxlength--; /* max_length <= 0 means no max length. */    str_start = str;       /* In case no number is formed. */ -  r->type = T_INT; -  r->subtype = NUMBER_NUMBER; -  r->u.integer = 0; +  SET_SVAL(*r, T_INT, NUMBER_NUMBER, integer, 0);    if(ptr != 0)    *ptr = str;       if(base < 0 || MBASE < base)    return 0;       if(!WIDE_ISALNUM(c = EXTRACT_PCHARP(str)))    {    while(WIDE_ISSPACE(c))    {
pike.git/src/stralloc.c:3417:    }       return 1;   }      PMOD_EXPORT int convert_stack_top_string_to_inumber(int base)   {    struct svalue r;    int i;    -  if(Pike_sp[-1].type != T_STRING) +  if(TYPEOF(Pike_sp[-1]) != T_STRING)    Pike_error("Cannot convert stack top to integer number.\n");       i=pcharp_to_svalue_inumber(&r, MKPCHARP_STR(Pike_sp[-1].u.string), 0, base, 0);       free_string(Pike_sp[-1].u.string);    Pike_sp[-1] = r;       return i;   }