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.
222
2007/
09
/
24
19
:
18
:
24
grubba Exp $
+
|| $Id: operators.c,v 1.
223
2007/
12
/
28
10
:
29
:
43
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:195:
*! Returns the resulting program. *! *! @seealso *! @[cast_to_object()] */ /*! @endclass */ /* Special case for casting to int. */
-
void o_cast_to_int(void)
+
PMOD_EXPORT
void o_cast_to_int(void)
{ switch(sp[-1].type) { case T_OBJECT: if(!sp[-1].u.object->prog) { /* Casting a destructed object should be like casting a zero. */ pop_stack(); push_int (0); }
pike.git/src/operators.c:458:
break; default: Pike_error("Cannot cast %s to string.\n", get_name_of_type(sp[-1].type)); } sp[-1].type = PIKE_T_STRING; sp[-1].u.string = make_shared_string(buf); }
-
void o_cast(struct pike_type *type, INT32 run_time_type)
+
PMOD_EXPORT
void o_cast(struct pike_type *type, INT32 run_time_type)
{ if(run_time_type != sp[-1].type) { if(run_time_type == T_MIXED) return; if (sp[-1].type == T_OBJECT && !sp[-1].u.object->prog) { /* Casting a destructed object should be like casting a zero. */ pop_stack(); push_int (0);