pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:9816:      /* Get the resulting type from a soft cast.    *    * Flags:    * 1 SOFT_WEAKER Weaker type.    */   struct pike_type *soft_cast(struct pike_type *soft_type,    struct pike_type *orig_type,    int flags)   { + #if 1 +  if (flags & SOFT_WEAKER) { +  return type_binop(PT_BINOP_AND, orig_type, soft_type, +  PT_FLAG_CMP_NULLABLE, PT_FLAG_CMP_NULLABLE, 0); +  } else { +  return type_binop(PT_BINOP_AND, orig_type, soft_type, 0, 0, 0); +  } + #else    struct pike_type *res = NULL;    struct pike_type *tmp = NULL;    struct pike_type *tmp2 = NULL;    struct pike_type *tmp3 = NULL;       if (soft_type == orig_type) {    copy_pike_type(res, soft_type);    return res;    }   
pike.git/src/pike_types.cmod:10248:    }    break;    }    break;    }    }    if (tmp) free_type(tmp);    if (tmp2) free_type(tmp2);    if (tmp3) free_type(tmp3);    return res; + #endif   }      /**    * Check whether sval is a valid value for a variable of    * type type.    *    * Returns 1 if ok, and 0 (zero) otherwise.    */   static int match_type_svalue(struct pike_type *type,    int flags,