pike.git / src / program.c

version» Context lines:

pike.git/src/program.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: program.c,v 1.717 2008/06/02 15:43:29 mast Exp $ + || $Id: program.c,v 1.718 2008/06/09 10:57:08 grubba Exp $   */      #include "global.h"   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"   #include "pike_types.h"   #include "stralloc.h"   #include "las.h"   #include "lex.h"
pike.git/src/program.c:6865:    *    * Note: Unlike the other get*line() functions, this one does not    * add a reference to the returned string.    */   PMOD_EXPORT struct pike_string *get_identifier_line(struct program *p,    int fun, INT32 *linep)   {    struct reference *ref = PTR_FROM_INT(p, fun);    struct identifier *id = ID_FROM_PTR(p, ref);    p = PROG_FROM_PTR(p, ref); -  if (id->filename_strno < 0) return NULL; +  if (id->filename_strno >= p->num_strings) return NULL;    if (linep) *linep = id->linenumber;    return p->strings[id->filename_strno];   }      /* Main entry point for compiler messages originating from    * C-code.    *    * Sends the message along to PikeCompiler()->report().    *    * NOTE: The format string fmt (and vargs) is only formatted with
pike.git/src/program.c:9612:    *!    *! Program used internally by the compiler to create objects    *! that are later modified into instances of the compiled program    *! by the compiler.    *!    *! @seealso    *! @[__placeholder_object]    */    {    struct svalue s; -  start_new_program(); +  debug_start_new_program(0, "__null_program");    null_program=end_program();    s.type=T_PROGRAM;    s.u.program=null_program;    low_add_constant("__null_program",&s);    debug_malloc_touch(null_program);    }       /*! @decl constant __placeholder_object    *!    *! Object used internally by the compiler.