pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:394:    *! the variable initialization expressions in this class, in the    *! order they occur.    *!    *! @note    *! This function can not be overloaded or blocked from executing.    *!    *! @seealso    *! @[lfun::create()]    */    - /*! @decl void lfun::create(zero ... args) + /*! @decl void lfun::create(__unknown__ ... args)    *!    *! Object creation callback.    *!    *! This function is called right after @[lfun::__INIT()].    *!    *! @[args] are the arguments passed when the program was called.    *!    *! @note    *! If there exists an implicitly created @[lfun::__create__()]    *! its arguments will be prepended to @[args] (affecting the
pike.git/src/program.c:564:    *! int bar;    *! local protected void __create__(int foo)    *! {    *! this::foo = foo;    *! }    *! }    *! @endcode    *!    *! @note    *! Note also that in case @[lfun::create()] does not exist, -  *! this function will be called instead. +  *! it will be created as an alias for this function.    *!    *! @note    *! This function did not exist in Pike 8.0 and earlier (where it    *! was instead automatically inlined in @[lfun::create()].    *!    *! @seealso    *! @[lfun::create()], @[lfun::__INIT()]    */      /*! @decl mixed lfun::`+(zero arg)
pike.git/src/program.c:2501:    }    }    }    if (inherit_depth > 0) {    return mkexternalnode(inherit_state->new_program, id);    }    return mkidentifiernode(id);    }    }    -  if (ident == lfun_strings[LFUN_CREATE]) { -  /* Try looking up __create__ instead. */ -  return find_inherited_identifier(inherit_state, inherit_depth, inh, -  lfun_strings[LFUN___CREATE__]); -  } -  +     if (inh < 0) inh = -1;       return program_magic_identifier(inherit_state, inherit_depth, inh, ident, 1);   }      /*! @decl constant this    *!    *! Builtin read only variable that evaluates to the current object.    *!    *! @seealso
pike.git/src/program.c:8202:    /* One of them is missing. */    return -1;    }    }    }    if (c && !(c->lex.pragmas & ID_NO_DEPRECATION_WARNINGS)) {    yywarning("Compat: Substituting %S() for %S().",    lfun_compat_name, lfun_name);    }    } -  } else if (lfun == LFUN_CREATE) { -  /* NB: In the first pass, we do not know yet if there'll -  * be an lfun::create() later, in which case the type -  * may differ from the type for lfun::__create__(). -  */ -  if (p->flags & PROGRAM_PASS_1_DONE) { -  /* No lfun::create(), but there might be an lfun::__create__(). */ -  return low_find_lfun(p, LFUN___CREATE__); +     }    } -  } +        if (i < 0 || !(p->flags & PROGRAM_FIXED)) {    return i;    }    id = ID_FROM_INT(p, i);   #if 0    if (IDENTIFIER_IS_PIKE_FUNCTION(id->identifier_flags) &&    (id->func.offset == -1)) {    /* Function prototype. */    return -1;