pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:1652:    * Look up the reference in the wrapped object    * corresponding to the current function.    */   static int low_proxy_ref(void)   {    /* Note that we index on the identifier offset,    * NOT the reference number, as more references    * may get added on demand via eg local::, etc.    */    struct reference *ref = -  PTR_FROM_INT(Pike_fp->context->prog, -  Pike_fp->fun - Pike_fp->context->identifier_level); +  PTR_FROM_INT(Pike_fp->current_program, Pike_fp->fun);    struct array *a = Pike_fp->context->prog->constants[0].sval.u.array;    return ITEM(a)[ref->identifier_offset].u.integer;   }      static void f_proxy_getter(INT32 args)   {    struct program *expected =    Pike_fp->context->prog->constants[1].sval.u.program;    int proxy_ref = low_proxy_ref();    /* NB: We only have a single variable i storage. */