pike.git
/
src
/
operators.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/operators.c:1:
/* || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information.
-
|| $Id: operators.c,v 1.
256
2009/11/05
13
:
48
:
55
grubba Exp $
+
|| $Id: operators.c,v 1.
257
2009/11/05
16
:
51
:
45
grubba Exp $
*/ #include "global.h" #include <math.h> #include "interpret.h" #include "svalue.h" #include "multiset.h" #include "mapping.h" #include "array.h" #include "stralloc.h"
pike.git/src/operators.c:317:
/* This can be here independently of AUTO_BIGNUM. Besides, we really want to reduce the number of number parsers around here. :) /Noring */ #ifdef AUTO_BIGNUM /* The generic function is rather slow, so I added this * code for benchmark purposes. :-) /per */ if( (sp[-1].u.string->len >= 10) || sp[-1].u.string->size_shift ) convert_stack_top_string_to_inumber(10); else
-
#
else
+
#
endif /* AUTO_BIGNUM */
{ INT_TYPE i = STRTOL(sp[-1].u.string->str, 0, 10); free_string(sp[-1].u.string); sp[-1].type=T_INT; sp[-1].subtype = NUMBER_NUMBER; sp[-1].u.integer=i; }
-
#endif /* AUTO_BIGNUM */
+
break; case PIKE_T_INT: break; default: Pike_error("Cannot cast %s to int.\n", get_name_of_type(sp[-1].type)); } }