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.20 1997/03/17 03:04:43 hubbe Exp $"); + RCSID("$Id: pike_types.c,v 1.21 1997/04/16 03:09:15 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"   #include "mapping.h"   #include "pike_macros.h"   #include "error.h"   #include "las.h"   #include "language.h" -  + #include "memory.h"      int max_correct_args;      static void internal_parse_type(char **s);   static int type_length(char *t);      #define TWOT(X,Y) (((X) << 8)+(Y))   #define EXTRACT_TWOT(X,Y) TWOT(EXTRACT_UCHAR(X), EXTRACT_UCHAR(Y))      /*
pike.git/src/pike_types.c:704:       /* Special cases (tm) */    switch(EXTRACT_TWOT(a,b))    {    case TWOT(T_PROGRAM, T_FUNCTION):    case TWOT(T_FUNCTION, T_PROGRAM):    return a;    case TWOT(T_OBJECT, T_FUNCTION):    {    struct program *p; -  if(p=id_to_program(EXTRACT_INT(a+1))) +  if((p=id_to_program(EXTRACT_INT(a+1))))    {    int i=p->lfuns[LFUN_CALL];    if(i == -1) return 0;    return low_match_types(ID_FROM_INT(p, i)->type->str, b, flags);    }    return a;    }       case TWOT(T_FUNCTION, T_OBJECT):    {    struct program *p; -  if(p=id_to_program(EXTRACT_INT(b+1))) +  if((p=id_to_program(EXTRACT_INT(b+1))))    {    int i=p->lfuns[LFUN_CALL];    if(i == -1) return 0;    return low_match_types(a, ID_FROM_INT(p, i)->type->str, flags);    }    return a;    }    }       if(EXTRACT_UCHAR(a) != EXTRACT_UCHAR(b)) return 0;