mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-05-01 15:28:00 +00:00
MINOR: sample: export sample_casts
just export the sample cast matrix "sample_casts" to prepare the generic sample conversion parser.
This commit is contained in:
parent
20f4996738
commit
8af6ff12b5
@ -293,4 +293,7 @@ struct sample_conv_kw_list {
|
|||||||
struct sample_conv kw[VAR_ARRAY]; /* array of sample conversion descriptors */
|
struct sample_conv kw[VAR_ARRAY]; /* array of sample conversion descriptors */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef int (*sample_cast_fct)(struct sample *smp);
|
||||||
|
extern sample_cast_fct sample_casts[SMP_TYPES][SMP_TYPES];
|
||||||
|
|
||||||
#endif /* _TYPES_SAMPLE_H */
|
#endif /* _TYPES_SAMPLE_H */
|
||||||
|
@ -512,8 +512,7 @@ static int c_str2int(struct sample *smp)
|
|||||||
/* NULL pointer used for impossible sample casts */
|
/* NULL pointer used for impossible sample casts */
|
||||||
/*****************************************************************/
|
/*****************************************************************/
|
||||||
|
|
||||||
typedef int (*sample_cast_fct)(struct sample *smp);
|
sample_cast_fct sample_casts[SMP_TYPES][SMP_TYPES] = {
|
||||||
static sample_cast_fct sample_casts[SMP_TYPES][SMP_TYPES] = {
|
|
||||||
/* to: BOOL UINT SINT IPV4 IPV6 STR BIN CSTR CBIN */
|
/* to: BOOL UINT SINT IPV4 IPV6 STR BIN CSTR CBIN */
|
||||||
/* from: BOOL */ { c_none, c_none, c_none, NULL, NULL, c_int2str, NULL, c_int2str, NULL },
|
/* from: BOOL */ { c_none, c_none, c_none, NULL, NULL, c_int2str, NULL, c_int2str, NULL },
|
||||||
/* UINT */ { c_none, c_none, c_none, c_int2ip, NULL, c_int2str, NULL, c_int2str, NULL },
|
/* UINT */ { c_none, c_none, c_none, c_int2ip, NULL, c_int2str, NULL, c_int2str, NULL },
|
||||||
|
Loading…
Reference in New Issue
Block a user