pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:1605:    }    else    push_int(0);   }      static void f_proxy_create(INT32 args)   {    struct object *o;    struct program *p;    struct program *expected; -  if (args != 1) { +  if (!args) { +  apply_svalue(&Pike_fp->context->prog->constants[1].sval, 0); +  } else if (args != 1) {    wrong_number_of_args_error("create", args, 1);    }    if (TYPEOF(Pike_sp[-1]) != PIKE_T_OBJECT) {    SIMPLE_ARG_TYPE_ERROR("create", 1, "object");    }    expected = Pike_fp->context->prog->constants[1].sval.u.program;    o = Pike_sp[-1].u.object;    p = o->prog;    if (!p) {    Pike_error("Destructed object.\n");
pike.git/src/builtin.cmod:2028:    if (i < 0) {    free_type(fun_type);    }    }       /* Add a suitable create(). */    type_stack_mark();    push_type(T_VOID);    push_type(T_VOID);    push_type(T_MANY); +  push_type(T_VOID);    push_object_type(0, p->id); -  +  push_type(T_OR);    push_type(T_FUNCTION);    fun_type = pop_unfinished_type();    ptr.c_fun = f_proxy_create;    j = define_function(lfun_strings[LFUN_CREATE], fun_type, ID_PROTECTED,    IDENTIFIER_C_FUNCTION, &ptr, 0);    free_type(fun_type);       p = end_program();    exit_compiler();