pike.git / src / interpret.c

version» Context lines:

pike.git/src/interpret.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: interpret.c,v 1.351 2004/06/01 19:12:05 mast Exp $ + || $Id: interpret.c,v 1.352 2004/08/19 15:00:37 grubba Exp $   */      #include "global.h" - RCSID("$Id: interpret.c,v 1.351 2004/06/01 19:12:05 mast Exp $"); + RCSID("$Id: interpret.c,v 1.352 2004/08/19 15:00:37 grubba Exp $");   #include "interpret.h"   #include "object.h"   #include "program.h"   #include "svalue.h"   #include "array.h"   #include "mapping.h"   #include "pike_error.h"   #include "stralloc.h"   #include "constants.h"   #include "pike_macros.h"
pike.git/src/interpret.c:556:    struct program *p;       TRACE((4, "-find_external_context(%d, inherit=%ld)\n", depth,    DO_NOT_WARN((long)(loc->o->prog ? loc->inherit - loc->o->prog->inherits : 0))));      #ifdef PIKE_DEBUG    if(!loc->o)    Pike_fatal("No object\n");   #endif    -  p = loc->o->prog; +  if (!(p = loc->o->prog)) { +  /* magic fallback */ +  p = get_program_for_object_being_destructed(loc->o); +  if(!p) +  { +  Pike_error("Cannot access parent of destructed object.\n"); +  } +  }      #ifdef DEBUG_MALLOC    if (loc->o->refs == 0x55555555) {    fprintf(stderr, "The object %p has been zapped!\n", loc->o);    describe(p);    Pike_fatal("Object zapping detected.\n");    }    if (p && p->refs == 0x55555555) {    fprintf(stderr, "The program %p has been zapped!\n", p);    describe(p);
pike.git/src/interpret.c:591: Inside #if defined(PIKE_DEBUG)
   if(Pike_interpreter.trace_level>8)    my_describe_inherit_structure(p);   #endif       TRACE((4,"- i->parent_offset=%d i->parent_identifier=%d\n",    inh->parent_offset,    inh->parent_identifier));       TRACE((4,"- o->parent_identifier=%d inherit->identifier_level=%d\n",    (p->flags & PROGRAM_USES_PARENT) ? -  PARENT_INFO(loc->o)->parent_identifier : -1, +  LOW_PARENT_INFO(loc->o, p)->parent_identifier : -1,    inh->identifier_level));       switch(inh->parent_offset)    {    default:    {    int my_level = inh->inherit_level;   #ifdef PIKE_DEBUG    if(!my_level)    Pike_fatal("Gahhh! inherit level zero in wrong place!\n");