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.349 2008/08/11 13:36:58 grubba Exp $ + || $Id: pike_types.c,v 1.350 2008/08/11 15:15:43 grubba 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:3789:    /* Special case for T_VOID */    /* FIXME: Should probably be handled as T_ZERO. */   #ifdef TYPE_GROUPING    if (flags & LE_A_GROUPED) return 1;   #endif    a = a->cdr;    goto recurse;    } else {    ret = low_pike_types_le(a->car, b, array_cnt, flags);   #ifdef TYPE_GROUPING -  if (!ret == !(flags & LE_A_GROUPED)) return ret; +  if (!ret == !(flags & LE_A_GROUPED)) { +  /* Note: Needed for side effects... */ +  low_pike_types_le(a->cdr, b, array_cnt, flags); +  return ret; +  }   #else    if (!ret) return 0;   #endif    if (a->cdr->type == T_VOID) {    /* Special case for T_VOID */    /* FIXME: Should probably be handled as T_ZERO. */    return 1;    } else {    a = a->cdr;    goto recurse;
pike.git/src/pike_types.c:3981:    b = b->cdr;    goto recurse;       case T_OR:    /* OK if a is a subset of either of the parts,    * unless we are grouped, in which case both    * parts need to be a subset.    */    ret = low_pike_types_le(a, b->car, array_cnt, flags);   #ifdef TYPE_GROUPING -  if (!ret != !(flags & LE_B_GROUPED)) return ret; +  if (!ret != !(flags & LE_B_GROUPED)) { +  low_pike_types_le(a, b->cdr, array_cnt, flags); +  return ret; +  }   #else    if (ret) return ret;   #endif    b = b->cdr;    goto recurse;       case PIKE_T_RING:    b = b->car;    goto recurse;   
pike.git/src/pike_types.c:6091: Inside #if defined(PIKE_DEBUG)
   * so that markers get set and kept. */   #ifdef PIKE_DEBUG    if (l_flag>2) {    fprintf(stderr, "%*sChecking argument type ", indent*2+2, "");    simple_describe_type(arg_type);    fprintf(stderr, " against function type ");    simple_describe_type(fun_type);    fprintf(stderr, ".\n");    }   #endif /* PIKE_DEBUG */ -  /* No need to parform advanced checking in the trivial case... */ +  /* No need to perform advanced checking in the trivial case... */    if (arg_type != (tmp2 = fun_type->car)) {    if ((flags & CALL_7_6) && (arg_type == void_type_string)) {    /* Compat with Pike 7.6 and earlier. */    arg_type = zero_type_string;    }       if (!low_pike_types_le(arg_type, tmp2, 0, 0) &&    ((flags & CALL_STRICT) ||    !low_match_types(arg_type, tmp2, NO_SHORTCUTS))) {    /* No match. */