]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD/MINOR: lua: ensure that hlua_ctx_destroy is properly defined
authorWilly Tarreau <w@1wt.eu>
Wed, 17 Jun 2015 18:18:54 +0000 (20:18 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 17 Jun 2015 18:18:54 +0000 (20:18 +0200)
When Lua is disabled, the alternate functions must have the same
prototype as the original ones, otherwise we get such warnings :

src/stream.c:278:27: warning: too many arguments in call to 'hlua_ctx_destroy'
        hlua_ctx_destroy(&s->hlua);
        ~~~~~~~~~~~~~~~~         ^
No backport is needed.

include/proto/hlua.h

index 4215373efc50830ace088d9f0460dd6621deb7fe..7ad5a99ef39285fc1608bea49807578d40e52458 100644 (file)
@@ -37,7 +37,7 @@ int hlua_post_init();
 /* Empty function for compilation without Lua. */
 static inline void hlua_init() { }
 static inline int hlua_post_init() { return 1; }
-static inline void hlua_ctx_destroy() { }
+static inline void hlua_ctx_destroy(struct hlua *lua) { }
 
 #endif /* USE_LUA */