pike.git / src / modules / _Roxen / roxen.c

version» Context lines:

pike.git/src/modules/_Roxen/roxen.c:485:       switch( Pike_sp[-1].type )    {    void o_cast_to_string();       case PIKE_T_INT:    /* Optimization, this is basically a inlined cast_int_to_string */    {    char buf[21], *b = buf + (sizeof (buf) - 2);    int neg, j=0; -  INT_TYPE i = Pike_sp[-1].u.integer; -  if( i < 0 ) +  unsigned INT_TYPE i = Pike_sp[-1].u.integer; +  if( Pike_sp[-1].u.integer < 0 )    {    neg = 1; -  i = -i; -  if (i < 0) { -  /* The largest negative number cannot be negated. */ -  o_cast_to_string(); -  return; +  i = -i; /* Always defined for unsigned - signed overflows are not. */    } -  } +     else    neg = 0;    pop_stack();       buf[sizeof (buf) - 1] = 0;       while( i >= 10 )    {    b[ -j++ ] = '0'+(i%10);    i /= 10;