]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: vars: replace static functions with global ones
authorMiroslav Zagorac <mzagorac@haproxy.com>
Wed, 9 Dec 2020 15:34:29 +0000 (16:34 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Dec 2020 13:20:08 +0000 (14:20 +0100)
The OpenTracing filter uses several internal HAProxy functions to work
with variables and therefore requires two static local HAProxy functions,
var_accounting_diff() and var_clear(), to be declared global.

In fact, the var_clear() function was not originally defined as static,
but it lacked a declaration.

include/haproxy/vars.h
src/vars.c

index 1d0a47abb938fbce404fc74b9d67969eaa74bee3..aeb218a72d2386849a66a45a067d6f3143308da9 100644 (file)
@@ -28,6 +28,8 @@
 #include <haproxy/vars-t.h>
 
 void vars_init(struct vars *vars, enum vars_scope scope);
+void var_accounting_diff(struct vars *vars, struct session *sess, struct stream *strm, int size);
+unsigned int var_clear(struct var *var);
 void vars_prune(struct vars *vars, struct session *sess, struct stream *strm);
 void vars_prune_per_sess(struct vars *vars);
 int vars_get_by_name(const char *name, size_t len, struct sample *smp);
index b847b5d37ea55dc657c02364dc0b96f6674e1dc5..e3289996bde5decf82fadfcc37143b09c3fc14f7 100644 (file)
@@ -65,7 +65,7 @@ static inline struct vars *get_vars(struct session *sess, struct stream *strm, e
 /* This function adds or remove memory size from the accounting. The inner
  * pointers may be null when setting the outer ones only.
  */
-static void var_accounting_diff(struct vars *vars, struct session *sess, struct stream *strm, int size)
+void var_accounting_diff(struct vars *vars, struct session *sess, struct stream *strm, int size)
 {
        switch (vars->scope) {
        case SCOPE_REQ: