MEDIUM: acl: Last patch change the output type

This patch remove the compatibility check from the input type and the
match method. Now, it checks if a casts from the input type to output
type exists and the pattern_exec_match() function apply casts before
each pattern matching.
diff --git a/include/proto/sample.h b/include/proto/sample.h
index 20c2954..79d123c 100644
--- a/include/proto/sample.h
+++ b/include/proto/sample.h
@@ -41,4 +41,17 @@
 int smp_resolve_args(struct proxy *p);
 int smp_expr_output_type(struct sample_expr *expr);
 
+/*
+ * This function just apply a cast on sample. It returns 0 if the cast is not
+ * avalaible or if the cast fails, otherwise returns 1. It does not modify the
+ * input sample on failure.
+ */
+static inline
+int sample_convert(struct sample *sample, int req_type)
+{
+	if (!sample_casts[sample->type][req_type])
+		return 0;
+	return sample_casts[sample->type][req_type](sample);
+}
+
 #endif /* _PROTO_SAMPLE_H */