pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:9953:   #endif       EXIT_REMAP_STATE(remap);       free_type(tmp);    free_type(tmp2);       return !tmp2;   }    + /** +  * Check whether a is a valid variant overload of b. +  * +  * Returns 0 if a shadows all cases of b (ie b will never be used). +  * +  * Returns 1 otherwise. +  */   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); +  struct pike_type *diff = type_binop(PT_BINOP_MINUS, b, a, 0, 0, 0); +  if (diff) { +  free_type(diff); +  return 1;    } -  +  return 0; + }         /* FIXME, add the index */   static struct pike_type *low_index_type(struct pike_type *t,    struct pike_type *index_type,    node *n)   #ifdef DEBUG_MALLOC   #define low_index_type(X,Y,Z) ((struct pike_type *)debug_malloc_pass(low_index_type((X),(Y),(Z))))   #endif   {