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.637 2008/01/13 15:49:01 grubba Exp $ + || $Id: program.c,v 1.638 2008/01/13 19:53:49 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:4214:    if(!inherit.parent)    {    if(parent && parent->next != parent && inherit.parent_offset)    {    struct object *par=parent;    int e,pid=parent_identifier;       for(e=1;e<inherit.parent_offset;e++)    {    struct inherit *in; -  if(!par->prog) +  if(!par || !par->prog)    { -  par=0; -  pid=-1; +  par = NULL; +  pid = -1;    break;    }       in=INHERIT_FROM_INT(par->prog, pid);    switch(in->parent_offset)    {    default:    {    struct external_variable_context tmp;    struct inherit *in2=in;
pike.git/src/program.c:4251:    break;       case OBJECT_PARENT:    /* Ponder: Can we be sure that PROGRAM_USES_PARENT    * doesn't get set later? /mast */    if(par->prog->flags & PROGRAM_USES_PARENT)    {    pid = PARENT_INFO(par)->parent_identifier;    par = PARENT_INFO(par)->parent;    }else{ -  pid=-1; -  par=0; +  pid = -1; +  par = NULL;    }    }    }       inherit.parent=par;    inherit.parent_offset=INHERIT_PARENT;    }    }    }    if(inherit.parent) add_ref(inherit.parent);