pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.c:4423:    /* Note: flags never has grouping at this point. */    if (!low_pike_types_le(b->car, a->car, 0, flags ^ LE_A_B_SWAPPED)) {    return 0;    }    }       a = a->cdr;    b = b->cdr;       /* check the returntype */ +  if (flags & LE_TYPE_SVALUE) return 1;    /* FIXME: Check array_cnt */    if ((b->type != T_VOID) && (a->type != T_VOID)) {    if(!low_pike_types_le(a, b, array_cnt, flags)) return 0;    }    return 1;    }       if(a->type != b->type) return 0;       if (array_cnt) return 0;       switch(a->type)    {    case T_MAPPING: -  +  if (flags & LE_TYPE_SVALUE) return 1;    /*    * mapping(A:B) <= mapping(C:D) iff A <= C && B <= D.    */    if(!low_pike_types_le(a->car, b->car, 0, flags)) return 0;    array_cnt = 0;    a = a->cdr;    b = b->cdr;    goto recurse;       case T_OBJECT:
pike.git/src/pike_types.c:4541:    if(amin < bmin || amax > bmax) return 0;    break;    }          case T_TYPE:    case T_PROGRAM:    case T_MULTISET:    case T_ARRAY:    case T_STRING: +  if (flags & LE_TYPE_SVALUE) return 1;    a = a->car;    b = b->car;    array_cnt = 0;    goto recurse;       case T_FLOAT:    case T_ZERO:    case T_VOID:    case T_MIXED:    break;
pike.git/src/pike_types.c:4707:    clear_markers();    return !!low_match_types(a, b, 0);   }      int pike_types_le(struct pike_type *a,struct pike_type *b)   {    clear_markers();    return low_pike_types_le(a, b, 0, 0);   }    + int check_variant_overload(struct pike_type *a, struct pike_type *b) + { +  clear_markers(); +  return !low_pike_types_le(b, a, 0, LE_TYPE_SVALUE); + }      #ifdef DEBUG_MALLOC   #define low_index_type(X,Y,Z) ((struct pike_type *)debug_malloc_pass(debug_low_index_type((X),(Y),(Z))))   #else   #define low_index_type debug_low_index_type   #endif      /* FIXME, add the index */   static struct pike_type *debug_low_index_type(struct pike_type *t,    struct pike_type *index_type,