pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:1834:   #endif    push_svalue(&THIS->_fun);    f_function_name(1);    push_text("(), ");    f_add(2);    } else {    free_svalue(&THIS->_fun);    SET_SVAL(THIS->_fun, PIKE_T_INT, NUMBER_DESTRUCTED, integer, 0);    push_text("destructed_function(), ");    } +  } else if (TYPEOF(THIS->_fun) == PIKE_T_PROGRAM) { +  /* FIXME: Use the master? */ +  push_text("program(), ");    } else if (TYPEOF(THIS->_fun) == PIKE_T_STRING) {    push_svalue(&THIS->_fun);    push_text("(), ");    f_add(2);    } else {    push_text("destructed_function(), ");    }       if (THIS->args) {    push_text("Args: ");
pike.git/src/builtin.cmod:2108:    add_ref(bf->prog);    bf->pc = f->pc;    }       SET_SVAL(bf->_fun, PIKE_T_INT, NUMBER_DESTRUCTED, integer, 0);       if (f->current_object && f->current_object->prog) {    if (f->fun == FUNCTION_BUILTIN) {    /* Unusual case. The frame is from call_c_initializers(), gc()    * or similar. cf [bug 6156]. /grubba +  * +  * Masquerade as the program. +  * +  * FIXME: Ought to keep parent-pointers.    */ -  struct pike_string *event_handler_string = -  MK_STRING("__EVENT_HANDLER__"); -  SET_SVAL(bf->_fun, PIKE_T_STRING, 0, string, event_handler_string); -  add_ref(event_handler_string); +  SET_SVAL(bf->_fun, PIKE_T_PROGRAM, 0, +  program, f->current_object->prog); +  add_ref(f->current_object->prog);    } else {    SET_SVAL(bf->_fun, PIKE_T_FUNCTION,    CHECK_IDREF_RANGE(f->fun, f->current_object->prog),    object, f->current_object);    add_ref(f->current_object);    function = ID_FROM_INT(f->current_object->prog, f->fun);   #ifdef PIKE_DEBUG    add_ref(bf->oprog = bf->_fun.u.object->prog);   #endif    }