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.29 1998/01/25 08:25:13 hubbe Exp $"); + RCSID("$Id: pike_types.c,v 1.30 1998/01/26 19:59:58 hubbe 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:907:         int match_types(struct pike_string *a,struct pike_string *b)   {    CHECK_TYPE(a);    CHECK_TYPE(b);    return 0!=low_match_types(a->str, b->str,0);   }       + #ifdef DEBUG_MALLOC + #define low_index_type(X,Y) ((struct pike_string *)debug_malloc_touch(debug_low_index_type((X),(Y)))) + #else + #define low_index_type debug_low_index_type + #endif      /* FIXME, add the index */ - static struct pike_string *low_index_type(char *t, node *n) + static struct pike_string *debug_low_index_type(char *t, node *n)   {    switch(EXTRACT_UCHAR(t++))    {    case T_OBJECT:    {    struct program *p=id_to_program(EXTRACT_INT(t));    if(p)    {    if(n->token == F_ARROW)    {
pike.git/src/pike_types.c:962:    {    struct pike_string *a,*b;    type_stack_mark();    a=low_index_type(t,n);    t+=type_length(t);    b=low_index_type(t,n);    if(!b) return a;    if(!a) return b;    push_finished_type(b);    push_finished_type(a); +  free_string(a); +  free_string(b);    push_type(T_OR);    return pop_unfinished_type();    }       case T_AND:    return low_index_type(t+type_length(t),n);       case T_STRING: /* always int */    case T_MULTISET: /* always int */    reference_shared_string(int_type_string);