CLEANUP: sample: uninline sample_conv_var2smp_str()
authorWilly Tarreau <w@1wt.eu>
Wed, 6 Oct 2021 13:20:18 +0000 (15:20 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 19 Oct 2021 13:55:44 +0000 (15:55 +0200)
There's no reason to limit this one to this file, it could be used in
other contexts.

(cherry picked from commit 4034e2cb5895c08bd821d4db6b5c47f90c4cd121)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 05cd2e6d04724d89a8fef29af16b9767d6bcd0ba)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>

include/haproxy/sample.h
src/sample.c

index 5389b2a..963c147 100644 (file)
@@ -41,6 +41,7 @@ struct sample *sample_fetch_as_type(struct proxy *px, struct session *sess,
                                    struct stream *strm, unsigned int opt,
                                    struct sample_expr *expr, int smp_type);
 int sample_conv_var2smp_sint(const struct arg *arg, struct sample *smp);
+int sample_conv_var2smp_str(const struct arg *arg, struct sample *smp);
 void release_sample_expr(struct sample_expr *expr);
 void sample_register_fetches(struct sample_fetch_kw_list *psl);
 void sample_register_convs(struct sample_conv_kw_list *psl);
index 8cc41d7..9a9fc23 100644 (file)
@@ -1669,7 +1669,7 @@ static int sample_conv_sha2(const struct arg *arg_p, struct sample *smp, void *p
  *
  * This function returns 0 if an error occurs, otherwise it returns 1.
  */
-static inline int sample_conv_var2smp_str(const struct arg *arg, struct sample *smp)
+int sample_conv_var2smp_str(const struct arg *arg, struct sample *smp)
 {
        switch (arg->type) {
        case ARGT_STR: