pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: builtin_functions.c,v 1.452 2002/11/28 02:19:15 mast Exp $ + || $Id: builtin_functions.c,v 1.453 2002/12/01 18:53:05 mast Exp $   */      #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.452 2002/11/28 02:19:15 mast Exp $"); + RCSID("$Id: builtin_functions.c,v 1.453 2002/12/01 18:53:05 mast Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"   #include "constants.h"   #include "mapping.h"   #include "stralloc.h"
pike.git/src/builtin_functions.c:7485:    */      /*! @module Function    */      /*! @decl string defined(function fun)    *!    *! Returns a string with filename and linenumber where @[fun]    *! was defined.    *! -  *! Returns @tt{0@} (zero) for builtin functions and functions in -  *! destructed objects. +  *! Returns @tt{0@} (zero) when no line can be found, e.g. for +  *! builtin functions and functions in destructed objects.    */   PMOD_EXPORT void f_function_defined(INT32 args)   {    check_all_args("Function.defined",args,BIT_FUNCTION, 0);       if(Pike_sp[-args].subtype != FUNCTION_BUILTIN &&    Pike_sp[-args].u.object->prog)    {    struct program *p = Pike_sp[-args].u.object->prog;    int func = Pike_sp[-args].subtype;
pike.git/src/builtin_functions.c:7513:    p = t->frame->current_object->prog;    func = t->func;    }    }       id=ID_FROM_INT(p, func);    if(IDENTIFIER_IS_PIKE_FUNCTION( id->identifier_flags ) &&    id->func.offset != -1)    {    INT32 line = 0; -  struct pike_string *tmp = get_line(p->program + id->func.offset, p, &line); +  struct pike_string *tmp = low_get_line(p->program + id->func.offset, p, &line);    if (tmp)    {    pop_n_elems(args);       push_string(tmp);    push_constant_text(":");    push_int(line);    f_add(3);    return;    }