MINOR: lua: remove some #define
The #define compilation directives are centralized in the hlua
include files. This permits to remove ome #ifdef from the haproxy
main code.
diff --git a/include/proto/hlua.h b/include/proto/hlua.h
index 50d6aa3..b9530aa 100644
--- a/include/proto/hlua.h
+++ b/include/proto/hlua.h
@@ -1,13 +1,28 @@
#ifndef _PROTO_HLUA_H
#define _PROTO_HLUA_H
+#ifdef USE_LUA
+
#include <lua.h>
#include <types/hlua.h>
+#define HLUA_INIT(__hlua) do { (__hlua)->T = 0; } while(0)
+
/* Lua HAProxy integration functions. */
void hlua_ctx_destroy(struct hlua *lua);
void hlua_init();
int hlua_post_init();
+#else /* USE_LUA */
+
+#define HLUA_INIT(__hlua)
+
+/* 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() { }
+
+#endif /* USE_LUA */
+
#endif /* _PROTO_HLUA_H */