pike.git / src / operators.c

version» Context lines:

pike.git/src/operators.c:506:    if (run_time_type == T_PROGRAM) {    if (IS_UNDEFINED(Pike_sp-1)) {    pop_stack();    f_object_program(1);    return;    }    }       stack_pop_keep_top();    +  if(TYPEOF(sp[-1]) == T_INT && +  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");       case T_MIXED:    return;   
pike.git/src/operators.c:717:    return;    }       default:    Pike_error("Cannot cast %s to a program.\n",    get_name_of_type(TYPEOF(sp[-1])));    }    }    }    -  if(TYPEOF(sp[-1]) == T_INT && -  SUBTYPEOF(sp[-1]) == NUMBER_UNDEFINED) -  Pike_error("Cannot cast this object to %s.\n", -  get_name_of_type(type->type)); -  +     if(run_time_type != TYPEOF(sp[-1]))    {    switch(TYPEOF(sp[-1])) {    case T_OBJECT:    if(sp[-1].u.object->prog)    {    struct object *o = sp[-1].u.object;    int f = FIND_LFUN(o->prog->inherits[SUBTYPEOF(sp[-1])].prog,    LFUN__IS_TYPE);    if( f != -1)