pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: interpret.c,v 1.190 2001/03/17 16:32:14 grubba Exp $"); + RCSID("$Id: interpret.c,v 1.191 2001/04/14 09:44:20 hubbe Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"   #include "svalue.h"   #include "array.h"   #include "mapping.h"   #include "pike_error.h"   #include "language.h"   #include "stralloc.h"   #include "constants.h"
pike.git/src/interpret.c:467:    while(--arg2>=0)    {   #ifdef PIKE_DEBUG    if(t_flag>8 && loc->o->prog)    my_describe_inherit_structure(loc->o->prog);   #endif       TRACE((4,"- i->parent_offset=%d i->parent_identifier=%d\n",    loc->inherit->parent_offset,    loc->inherit->parent_identifier)); +     TRACE((4,"- o->parent_identifier=%d inherit->identifier_level=%d\n", -  loc->o->parent_identifier, +  loc->o->prog->flags & PROGRAM_USES_PARENT ? +  PARENT_INFO(loc->o)->parent_identifier : -1,    loc->inherit->identifier_level));       switch(loc->inherit->parent_offset)    {    default:    {    struct external_variable_context tmp=*loc;   #ifdef PIKE_DEBUG    if(!loc->inherit->inherit_level)    fatal("Gahhh! inherit level zero in wrong place!\n");
pike.git/src/interpret.c:504:    break;       case -17:    TRACE((5,"- Following inherit->parent\n"));    loc->parent_identifier=loc->inherit->parent_identifier;    loc->o=loc->inherit->parent;    break;       case -18:    TRACE((5,"- Following o->parent\n")); -  loc->parent_identifier=loc->o->parent_identifier; -  loc->o=loc->o->parent; +  if(loc->o->prog && (loc->o->prog->flags & PROGRAM_USES_PARENT)) +  { +  loc->parent_identifier=PARENT_INFO(loc->o)->parent_identifier; +  loc->o=PARENT_INFO(loc->o)->parent; +  }else{ +  loc->o=0; +  loc->parent_identifier=-1; +  }    break;    }       if(!loc->o)    Pike_error("Parent was lost during cloning.\n");       if(!(p=loc->o->prog))    Pike_error("Attempting to access variable in destructed object\n");      #ifdef DEBUG_MALLOC