pike.git / src / operators.c

version» Context lines:

pike.git/src/operators.c:466:    /* Casting a destructed object should be like casting a zero. */    pop_stack();    push_int (0);    }       if(TYPEOF(sp[-1]) == T_OBJECT)    {    struct object *o = sp[-1].u.object;    int f = FIND_LFUN(o->prog->inherits[SUBTYPEOF(sp[-1])].prog, LFUN_CAST);    if(f == -1) { +  if (run_time_type == T_MAPPING) { +  stack_dup(); +  f_indices(1); +  stack_swap(); +  f_values(1); +  f_mkmapping(2); +  goto emulated_type_ok; +  }    if (run_time_type != T_PROGRAM) {    Pike_error("No cast method in object.\n");    }    f_object_program(1);    return;    }    push_static_text(get_name_of_type(type->type));    apply_low(o, f, 1);       if (run_time_type == T_PROGRAM) {