pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.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.   \*/   /**/   #include "global.h" - RCSID("$Id: pike_types.c,v 1.192 2002/07/23 13:23:04 mast Exp $"); + RCSID("$Id: pike_types.c,v 1.193 2002/08/14 16:27:01 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:22:   #include "las.h"   #include "language.h"   #include "lex.h"   #include "pike_memory.h"   #include "bignum.h"   #include "main.h"   #include "opcodes.h"   #include "block_alloc.h"      #ifdef PIKE_DEBUG - /* #define PIKE_TYPE_DEBUG */ + #define PIKE_TYPE_DEBUG   #endif /* PIKE_DEBUG */      /*    * Flags used by low_match_types().    */   #define A_EXACT 1   #define B_EXACT 2   #define NO_MAX_ARGS 4   #define NO_SHORTCUTS 8   
pike.git/src/pike_types.c:942:    }    break;    }    if(!strcmp(buf,"float")) { push_type(T_FLOAT); break; }    goto bad_type;       case 'o':    if(!strcmp(buf,"object"))    {    while(ISSPACE(**s)) ++*s; -  if(**s == '(') /* object({is,implements} id) */ +  if(**s == '(') /* object({,is,implements} {id,this_program}) */    { -  int is = 1, id; +  int is = 0, id;    ++*s; -  +  while(ISSPACE(**s)) ++*s;    if( **s != 'i' ) -  +  goto no_is_implements; +  ++*s; +  if( **s == 's' ) { +  ++*s; +  if (**s != ' ') {    goto bad_type; -  +  } +  is = 1;    ++*s; -  if( **s == 'm' ) -  is = 0; -  while( isidchar( **s ) ) ++*s; -  while( ISSPACE(**s) ) ++*s; +  } else { +  if (strncmp(*s, "mplements ", 10)) { +  goto bad_type; +  } +  *s += 10; +  } +  while(ISSPACE(**s)) ++*s; +  no_is_implements:    if( !**s )    goto bad_type; -  +  if (!strncmp(*s, "this_program", 12)) { +  id = Pike_compiler->new_program->id; +  *s += 12; +  } else {    id = atoi( *s );    while( **s >= '0' && **s <= '9' )    ++*s; -  +  }    while(ISSPACE(**s)) ++*s;    if( !**s || **s != ')' )    goto bad_type;    ++*s;    push_object_type(is, id);    }    else    push_object_type(0, 0);    break;    }