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.
233
2008/
05
/
29
10
:
11
:
15
grubba
Exp $
+
|| $Id: operators.c,v 1.
234
2008/
06
/
16
21
:
52
:
24
mast
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:418:
if (a->item[i].type != T_INT) Pike_error("cast: Item %d is not an integer.\n", i); break; } } break; } } s = begin_wide_shared_string(a->size, shift); switch(shift) {
+
default:
+
#ifdef PIKE_DEBUG
+
Pike_fatal("cast: Bad shift: %d.\n", shift);
+
break;
case 0:
-
+
#endif
for(i = a->size; i--; ) { s->str[i] = a->item[i].u.integer; } break; case 1: { p_wchar1 *str1 = STR1(s); for(i = a->size; i--; ) { str1[i] = a->item[i].u.integer; } } break; case 2: { p_wchar2 *str2 = STR2(s); for(i = a->size; i--; ) { str2[i] = a->item[i].u.integer; } } break;
-
#ifdef PIKE_DEBUG
-
default:
-
free_string(end_shared_string(s));
-
Pike_fatal("cast: Bad shift: %d.\n", shift);
-
break;
-
#endif
+
} s = end_shared_string(s); pop_stack(); push_string(s); } return; case T_FLOAT: sprintf(buf, "%f", (double)sp[-1].u.float_number); break;