pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.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: pike_types.c,v 1.177 2001/04/01 15:40:21 grubba Exp $"); + RCSID("$Id: pike_types.c,v 1.178 2001/04/18 17:58:12 grubba Exp $");   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"   #include "stralloc.h"   #include "stuff.h"   #include "array.h"   #include "program.h"   #include "constants.h"   #include "object.h"   #include "multiset.h"
pike.git/src/pike_types.c:652:    TYPE_STACK_DEBUG("push_type");   }      /* Pop one level of types. This is the inverse of push_type() */   void debug_pop_type_stack(unsigned INT16 expected)   {    struct pike_type *top;    if(Pike_compiler->type_stackp<type_stack)    fatal("Type stack underflow\n");    -  top = *(Pike_compiler->type_stackp--); +  top = *(Pike_compiler->type_stackp); +  /* Special case... */ +  if (top->type == T_MIXED) return; /* Probably due to an earlier error */ +  +  Pike_compiler->type_stackp--;   #ifdef PIKE_DEBUG    if ((top->type != expected) && (top->type != PIKE_T_NAME)) {    fatal("Unexpected type on stack: %d (expected %d)\n", top->type, expected);    }   #endif /* PIKE_DEBUG */    /* OPTIMIZE: It looks like this function is always called with    * expected == T_ARRAY.    */    switch(top->type) {    case T_FUNCTION: