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.178 2001/04/18 17:58:12 grubba Exp $"); + RCSID("$Id: pike_types.c,v 1.179 2001/04/23 21:30:04 marcus 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:4213:   #define low_make_pike_type debug_low_make_pike_type   #define low_make_function_type debug_low_make_function_type   #endif /* DEBUG_MALLOC */      static struct pike_type *debug_low_make_pike_type(unsigned char *type_string,    unsigned char **cont);      static struct pike_type *debug_low_make_function_type(unsigned char *type_string,    unsigned char **cont)   { +  struct pike_type *tmp; +     if (*type_string == T_MANY) { -  return mk_type(T_MANY, low_make_pike_type(type_string+1, cont), +  tmp = low_make_pike_type(type_string+1, cont); +  return mk_type(T_MANY, tmp,    low_make_pike_type(*cont, cont), PT_COPY_BOTH);    } -  return mk_type(T_FUNCTION, low_make_pike_type(type_string, cont), +  tmp = low_make_pike_type(type_string, cont); +  return mk_type(T_FUNCTION, tmp,    low_make_function_type(*cont, cont), PT_COPY_BOTH);   }      static struct pike_type *debug_low_make_pike_type(unsigned char *type_string,    unsigned char **cont)   {    unsigned INT32 type; -  +  struct pike_type *tmp;       switch(type = *type_string) {    case T_SCOPE:    case T_ASSIGN:    if ((type_string[1] < '0') || (type_string[1] > '9')) {    fatal("low_make_pike_type(): Bad marker: %d\n", type_string[1]);    }    return mk_type(type, (void *)(ptrdiff_t)(type_string[1] - '0'),    low_make_pike_type(type_string+2, cont), PT_COPY_CDR);    case T_FUNCTION:    /* Multiple ordered values. */    /* FIXME: */    return low_make_function_type(type_string+1, cont);    case T_TUPLE:    case T_MAPPING:    case PIKE_T_RING:    /* Order dependant */ -  return mk_type(type, low_make_pike_type(type_string+1, cont), +  tmp = low_make_pike_type(type_string+1, cont); +  return mk_type(type, tmp,    low_make_pike_type(*cont, cont), PT_COPY_BOTH);    case T_OR:    case T_AND:    /* Order independant */    /* FIXME: */ -  return mk_type(type, low_make_pike_type(type_string+1, cont), +  tmp = low_make_pike_type(type_string+1, cont); +  return mk_type(type, tmp,    low_make_pike_type(*cont, cont), PT_COPY_BOTH);    case T_ARRAY:    case T_MULTISET:    case T_TYPE:    case T_NOT:    case T_PROGRAM:    /* Single type */    return mk_type(type, low_make_pike_type(type_string+1, cont), NULL,    PT_COPY_CAR);    case '0':