pike.git
/
src
/
operators.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/operators.c:298:
free_string(sp[-1].u.string); SET_SVAL(sp[-1], T_INT, NUMBER_NUMBER, integer, i); } break; case PIKE_T_INT: break; default: Pike_error("Cannot cast %s to int.\n", get_name_of_type(TYPEOF(sp[-1])));
+
break;
} } /* Special case for casting to string. */ PMOD_EXPORT void o_cast_to_string(void) { struct pike_string *s; switch(TYPEOF(sp[-1])) {
pike.git/src/operators.c:417:
} break; } pop_stack(); push_string(end_shared_string(s)); } return; default: Pike_error("Cannot cast %s to string.\n", get_name_of_type(TYPEOF(sp[-1])));
+
break;
case PIKE_T_STRING: return; case T_FLOAT: { char buf[MAX_FLOAT_SPRINTF_LEN+1]; format_pike_float (buf, sp[-1].u.float_number); s = make_shared_string(buf); break;
pike.git/src/operators.c:510:
SUBTYPEOF(sp[-1]) == NUMBER_UNDEFINED) Pike_error("Cannot cast this object to %s.\n", get_name_of_type(type->type)); } else switch(run_time_type) { default: Pike_error("Cannot perform cast to that type.\n");
+
break;
case T_MULTISET: switch(TYPEOF(sp[-1])) { case T_ARRAY: { extern void f_mkmultiset(INT32); f_mkmultiset(1); break; }
pike.git/src/operators.c:4821:
apply_low (o, f, 4); stack_pop_keep_top(); } else switch (call_old_range_lfun (bound_types, o, low, high)) { case 1: bad_arg_error (range_func_name (bound_types), ind, sp - ind, 1, "object", ind, "Object got neither `[..] nor `[].\n");
+
break;
case 2: bad_arg_error (range_func_name (bound_types), ind, sp - ind, 1, "object", ind, "Object got no `[..] and there is no _sizeof to " "translate the from-the-end index to use `[].\n");
-
+
break;
case 3: bad_arg_error (range_func_name (bound_types), ind, 3, 1, "object", ind, "Cannot call `[..] in destructed object.\n");
-
+
break;
default: free_svalue (ind); move_svalue (ind, sp - 1); /* low and high have lost their refs in call_old_range_lfun. */ sp = ind + 1;
-
+
break;
} break; } case T_STRING: case T_ARRAY: { INT_TYPE l=0, h=0; if (!(bound_types & RANGE_LOW_OPEN)) { if (TYPEOF(*low) != T_INT)
pike.git/src/operators.c:5029:
stack_pop_keep_top(); } else { int bound_types; CALC_BOUND_TYPES (bound_types); switch (call_old_range_lfun (bound_types, o, ind + 1, ind + 3)) { case 1: SIMPLE_ARG_ERROR ("predef::`[..]", 1, "Object got neither `[..] nor `[].\n");
+
break;
case 2: SIMPLE_ARG_ERROR ("predef::`[..]", 1, "Object got no `[..] and there is no _sizeof to " "translate the from-the-end index to use `[].\n");
-
+
break;
case 3: SIMPLE_ARG_ERROR ("predef::`[..]", 1, "Cannot call `[..] in destructed object.\n");
-
+
break;
default: free_svalue (ind); move_svalue (ind, sp - 1); /* The bound types are simple integers and the bounds * themselves have lost their refs in call_old_range_lfun. */ sp = ind + 1;
-
+
break;
} } break; } case T_STRING: case T_ARRAY: { INT_TYPE l=0, h=0; int bound_types;