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.761 2009/04/22 17:17:55 grubba Exp $ + || $Id: program.c,v 1.762 2009/06/17 15:39:05 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:6956:    }    return res;   }      PMOD_EXPORT struct pike_string *low_get_function_line (struct object *o,    int fun, INT32 *linep)   {    if (o->prog) {    struct program *p;    struct identifier *id; +  struct pike_string *ret;    while (1) {    struct external_variable_context loc;    struct reference *idref = o->prog->identifier_references + fun;    p = PROG_FROM_PTR(o->prog, idref);    id = p->identifiers + idref->identifier_offset;    if (!IDENTIFIER_IS_ALIAS(id->identifier_flags)) break;    loc.o = o;    loc.inherit = INHERIT_FROM_INT(o->prog, fun);    loc.parent_identifier = fun;    find_external_context(&loc, id->func.ext_ref.depth);    fun = id->func.ext_ref.id + loc.inherit->identifier_level;    o = loc.o;    } -  if (IDENTIFIER_IS_PIKE_FUNCTION(id->identifier_flags)) +  if (IDENTIFIER_IS_PIKE_FUNCTION(id->identifier_flags) && +  (id->func.offset != -1))    return low_get_line (p->program + id->func.offset, p, linep); -  +  if ((ret = get_identifier_line(p, fun, linep))) { +  add_ref(ret); +  return ret; +  }    return low_get_program_line(o->prog, linep);    }    *linep = 0;    return NULL;   }      /* Return the file and line where the identifier with reference number    * fun was defined.    *    * Note: Unlike the other get*line() functions, this one does not