pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.c:54:   #ifdef TYPE_GROUPING   #define LE_A_GROUPED 4 /* Argument A has been grouped.    * Perform weaker checking for OR-nodes. */   #define LE_B_GROUPED 8 /* Argument B has been grouped.    * Perform weaker checking for OR-nodes. */   #define LE_A_B_GROUPED 12 /* Both the above two flags. */   #endif   #define LE_USE_HANDLERS 16 /* Call handlers if appropriate. */   #define LE_EXPLICIT_ZERO 32 /* Zero is not subtype of all others. */    + #define LE_STRICT_FUN 64 /* Require all arguments to functions. */ +    /*    * Flags used by low_get_first_arg_type()    *    * Note that these differ for the flags to get_first_arg_type().    */   #define FILTER_KEEP_VOID 1 /* Keep void during the filtering. */      /*    * Flags used as flag_method to mk_type()    */
pike.git/src/pike_types.c:4192:       case PIKE_T_RING:    b = b->car;    goto recurse;       case PIKE_T_ATTRIBUTE:    if (!c) {    b = b->cdr;    goto recurse;    } -  if (!low_pike_types_le(a, b->cdr, array_cnt, flags)) return 0; +  if (!low_pike_types_le(a, b->cdr, array_cnt, flags|LE_STRICT_FUN)) return 0;    ref_push_string((struct pike_string *)b->car);    ref_push_type_value(a);    ref_push_type_value(b->cdr);    safe_apply_current2(PC_PUSH_TYPE_ATTRIBUTE_FUN_NUM, 3,    "push_type_attribute");    if ((TYPEOF(Pike_sp[-1]) == T_INT) &&    (SUBTYPEOF(Pike_sp[-1]) == NUMBER_NUMBER) &&    (!Pike_sp[-1].u.integer)) {    pop_stack();    return 0;
pike.git/src/pike_types.c:4495:    {    a = a->cdr;    }       b_tmp = b->car;    if (b->type == T_FUNCTION)    {    b = b->cdr;    }    -  if (a_tmp->type != T_VOID) { +  if ((a_tmp->type != T_VOID) || (flags & LE_STRICT_FUN)) {    /* Note: flags never has grouping at this point. */    if (!low_pike_types_le(b_tmp, a_tmp, 0, flags ^ LE_A_B_SWAPPED)) {    return 0;    }    }    }    /* FALL_THROUGH */    case TWOT(T_MANY, T_MANY):    /* check the 'many' type */    if ((a->car->type != T_VOID) && (b->car->type != T_VOID)) {