pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:1:   /* -*- c -*-   || 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.cmod,v 1.130 2003/04/07 16:19:15 mast Exp $ + || $Id: builtin.cmod,v 1.131 2003/04/07 17:28:54 nilsson Exp $   */      #include "global.h"   #include "interpret.h"   #include "svalue.h"   #include "opcodes.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"
pike.git/src/builtin.cmod:692:   {    RETURN low_get_storage(parent, child) != -1;   }      /*! @decl string defined(program p)    *! @belongs Program    *!    *! Returns a string with filename and linenumber describing where    *! the program @[p] was defined.    *! -  *! The returned string is of the format @tt{"@i{filename@}:@i{linenumber@}"@}. +  *! The returned string is of the format @expr{"filename:linenumber"@}.    *! -  *! If it cannot be determined where the program was defined, @tt{0@} (zero) -  *! will be returned. +  *! If it cannot be determined where the program was defined, @expr{0@} +  *! (zero) will be returned.    */   PIKEFUN string program_defined(program p)    errname Program.defined;    optflags OPT_TRY_OPTIMIZE;   {    INT32 line;    struct pike_string *tmp = low_get_program_line(p, &line);       pop_n_elems(args);   
pike.git/src/builtin.cmod:840:    struct program *prog = low_allocate_program();    if (file) ext_store_program_line (prog, line->u.integer, file->u.string);    RETURN prog;    }   }      /*! @decl string function_name(function f)    *!    *! Return the name of the function @[f].    *! -  *! If @[f] is a global function defined in the runtime @tt{0@} (zero) -  *! will be returned. +  *! If @[f] is a global function defined in the runtime @expr{0@} +  *! (zero) will be returned.    *!    *! @seealso    *! @[function_object()]    */   PIKEFUN string function_name(program|function func)    efun;    optflags OPT_TRY_OPTIMIZE;   {    switch(func->type)    {
pike.git/src/builtin.cmod:918:    REF_RETURN ID_FROM_INT(func->u.object->prog, func->subtype)->name;    }    pop_n_elems(args);    push_int(0);   }      /*! @decl object function_object(function f)    *!    *! Return the object the function @[f] is in.    *! -  *! If @[f] is a global function defined in the runtime @tt{0@} (zero) -  *! will be returned. +  *! If @[f] is a global function defined in the runtime @expr{0@} +  *! (zero) will be returned.    *!    *! Zero will also be returned if @[f] is a constant in the    *! parent class. In that case @[function_program()] can be    *! used to get the parent program.    *!    *! @seealso    *! @[function_name()], @[function_program()]    */   PIKEFUN object function_object(function|program func)    efun;
pike.git/src/builtin.cmod:964:    SIMPLE_BAD_ARG_ERROR("function_object",1,"function");    }    pop_n_elems(args);    push_int(0);   }      /*! @decl program function_program(function|program f)    *!    *! Return the program the function @[f] is in.    *! -  *! If @[f] is a global function defined in the runtime @tt{0@} (zero) -  *! will be returned. +  *! If @[f] is a global function defined in the runtime @expr{0@} +  *! (zero) will be returned.    *!    *! @seealso    *! @[function_name()], @[function_object()]    */   PIKEFUN program function_program(program|function func)    efun;    optflags OPT_TRY_OPTIMIZE;   {    switch(func->type)    {