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. - || $Id: pike_types.c,v 1.343 2008/06/28 01:26:36 mast Exp $ + || $Id: pike_types.c,v 1.344 2008/06/29 10:51:47 mast Exp $   */      #include "global.h"   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"   #include "stralloc.h"   #include "stuff.h"   #include "array.h"   #include "program.h"
pike.git/src/pike_types.c:3578:    }    /* check the 'many' type */    if(b->car->type != T_VOID &&    a->car->type != T_VOID)    {    if(!low_match_types(a->car, b->car,    (flags | NO_MAX_ARGS) & ~(A_EXACT|B_EXACT)))    return 0;    }    if(!(flags & NO_MAX_ARGS)) -  max_correct_args=0x7fffffff; +  max_correct_args=MAX_INT32;    /* check the returntype */    a = a->cdr;    b = b->cdr;    if ((b->type == T_VOID) && (a->type != T_VOID)) {    /* Promote b to a function returning zero. */    if (!low_match_types(a, zero_type_string, flags & ~(A_EXACT|B_EXACT)))    return 0;    } else if ((a->type == T_VOID) && (b->type != T_VOID)) {    /* Promote a to a function returning zero. */    if(!low_match_types(zero_type_string, b, flags & ~(A_EXACT|B_EXACT)))
pike.git/src/pike_types.c:5247:    num2 = low_count_arguments(q->cdr);    if(num<0 && num2>0) return num2;    if(num2<0 && num>0) return num;    if(num2<0 && num<0) return ~num<~num2?num:num2;    return num<num2?num:num2;       case PIKE_T_NAME:    case PIKE_T_ATTRIBUTE:    return low_count_arguments(q->cdr);    -  default: return 0x7fffffff; +  default: return MAX_INT32;       case T_FUNCTION:    while(q->type == T_FUNCTION)    {    num++;    q = q->cdr;    }    /* FALL_THROUGH */    case T_MANY:    q = q->car;
pike.git/src/pike_types.c:7437:    INT32 min = extract_type_int((char *)type_string+1);    INT32 max = extract_type_int((char *)type_string+5);       *cont = type_string + 9; /* 2*sizeof(INT32) + 1 */    push_int_type(min, max);    break;    }       case PIKE_T_INT_UNTYPED:    *cont = type_string + 1; -  push_int_type((INT32)-0x80000000, 0x7fffffff); +  push_int_type(MIN_INT32, MAX_INT32);    break;       case T_OBJECT:    *cont = type_string + 6; /* 1 + sizeof(INT32) + 1 */    push_object_type(type_string[1], extract_type_int((char *)type_string+2));    break;       case PIKE_T_NAME:    case PIKE_T_ATTRIBUTE:    {