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.327 2008/05/06 15:28:26 grubba Exp $ + || $Id: pike_types.c,v 1.328 2008/05/08 10:07:39 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:5942: 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... */ +  if (arg_type != 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 = fun_type->car, 0, 0) &&    ((flags & CALL_STRICT) ||    !low_match_types(arg_type, tmp2, NO_SHORTCUTS))) {    /* No match. */   #ifdef PIKE_DEBUG    if (l_flag>2) {    fprintf(stderr, "%*sNo match.\n", indent*2+2, "");    }   #endif /* PIKE_DEBUG */    res = NULL;    if (tmp) free_type(tmp);    break;    } -  +  }    /* Match. */    if (fun_type->type == PIKE_T_FUNCTION) {    /* Advance to the next argument. */    fun_type = fun_type->cdr;    if ((flags & CALL_LAST_ARG) &&    (fun_type->type == PIKE_T_FUNCTION)) {    /* There are more required arguments. */   #ifdef PIKE_DEBUG    if (l_flag>2) {    fprintf(stderr, "%*sMore arguments required.\n", indent*2+2, "");
pike.git/src/pike_types.c:6109:    case T_OR:    if (!(tmp = low_new_check_call(fun_type, arg_type->car, flags, sval))) {    if (flags & CALL_STRICT) {    return NULL;    }    arg_type = arg_type->cdr;    goto loop;    }    if (!(tmp2 = low_new_check_call(fun_type, arg_type->cdr, flags, sval))) {    if (flags & CALL_STRICT) { +  free_type(tmp);    return NULL;    }    return tmp;    }    res = or_pike_types(tmp, tmp2, 1);    free_type(tmp);    free_type(tmp2);    return res;       case T_AND: