This one required a few more includes as it uses list and ebpt_node.
It still references lots of types/ files for now.
#include <stdio.h>
#include <stdarg.h>
+#include <haproxy/hlua.h>
#include <haproxy/time.h>
#include <types/global.h>
#include <types/stream.h>
#include <proto/arg.h>
-#include <proto/hlua.h>
#include <proto/log.h>
#include <proto/spoe.h>
-#ifndef _TYPES_HLUA_H
-#define _TYPES_HLUA_H
+/*
+ * include/haproxy/hlua-t.h
+ * Lua core types definitions
+ *
+ * Copyright (C) 2015-2016 Thierry Fournier <tfournier@arpalert.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation, version 2.1
+ * exclusively.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _HAPROXY_HLUA_T_H
+#define _HAPROXY_HLUA_T_H
#ifdef USE_LUA
#include <lua.h>
#include <lauxlib.h>
+#include <import/ebpttree.h>
+
+#include <haproxy/list-t.h>
#include <haproxy/regex-t.h>
#include <haproxy/xref-t.h>
};
#else /* USE_LUA */
+/************************ For use when Lua is disabled ********************/
/* Empty struct for compilation compatibility */
struct hlua { };
#endif /* USE_LUA */
-#endif /* _TYPES_HLUA_H */
+#endif /* _HAPROXY_HLUA_T_H */
-#ifndef _PROTO_HLUA_H
-#define _PROTO_HLUA_H
+/*
+ * include/haproxy/hlua.h
+ * Lua core management functions
+ *
+ * Copyright (C) 2015-2016 Thierry Fournier <tfournier@arpalert.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation, version 2.1
+ * exclusively.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
-#ifdef USE_LUA
+#ifndef _HAPROXY_HLUA_H
+#define _HAPROXY_HLUA_H
-#include <lua.h>
+#include <haproxy/hlua-t.h>
-#include <types/hlua.h>
+#ifdef USE_LUA
/* The following macros are used to set flags. */
#define HLUA_SET_RUN(__hlua) do {(__hlua)->flags |= HLUA_RUN;} while(0)
#else /* USE_LUA */
+/************************ For use when Lua is disabled ********************/
+
#define HLUA_IS_RUNNING(__hlua) 0
#define HLUA_INIT(__hlua)
#endif /* USE_LUA */
-#endif /* _PROTO_HLUA_H */
+#endif /* _HAPROXY_HLUA_H */
#include <haproxy/buf.h>
#include <haproxy/dynbuf-t.h>
#include <haproxy/freq_ctr-t.h>
+#include <haproxy/hlua-t.h>
#include <haproxy/xref-t.h>
-#include <types/hlua.h>
#include <types/obj_type.h>
#include <types/proxy.h>
#include <types/stream.h>
#include <haproxy/api-t.h>
#include <haproxy/dynbuf-t.h>
+#include <haproxy/hlua-t.h>
#include <haproxy/list-t.h>
#include <types/channel.h>
#include <types/filters.h>
-#include <types/hlua.h>
#include <types/obj_type.h>
#include <types/http_ana.h>
#include <types/proxy.h>
#include <haproxy/api.h>
#include <haproxy/buf.h>
#include <haproxy/debug.h>
+#include <haproxy/hlua.h>
#include <haproxy/thread.h>
#include <import/ist.h>
#include <haproxy/net_helper.h>
#include <proto/cli.h>
#include <haproxy/fd.h>
-#include <proto/hlua.h>
#include <proto/stream_interface.h>
#include <proto/task.h>
#include <haproxy/chunk.h>
#include <haproxy/dynbuf.h>
#include <haproxy/errors.h>
+#include <haproxy/hlua.h>
#include <haproxy/pool.h>
#include <haproxy/list.h>
#include <haproxy/namespace.h>
#include <proto/connection.h>
#include <haproxy/fd.h>
#include <proto/filters.h>
-#include <proto/hlua.h>
#include <proto/http_rules.h>
#include <proto/listener.h>
#include <proto/log.h>
#include <haproxy/regex.h>
#include <haproxy/xref.h>
#include <haproxy/h1.h>
+#include <haproxy/hlua.h>
#include <haproxy/tools.h>
#include <types/cli.h>
-#include <types/hlua.h>
#include <types/proxy.h>
#include <types/stats.h>
#include <proto/cli.h>
#include <proto/connection.h>
#include <proto/stats.h>
-#include <proto/hlua.h>
#include <proto/hlua_fcn.h>
#include <proto/http_fetch.h>
#include <proto/http_rules.h>
#include <lua.h>
#include <lualib.h>
+#include <haproxy/hlua-t.h>
#include <haproxy/http.h>
#include <haproxy/net_helper.h>
#include <haproxy/regex.h>
#include <common/uri_auth.h>
#include <types/cli.h>
-#include <types/hlua.h>
#include <types/proxy.h>
#include <types/stats.h>
#include <common/cfgparse.h>
#include <haproxy/dict.h>
#include <haproxy/dynbuf.h>
+#include <haproxy/hlua.h>
#include <haproxy/istbuf.h>
#include <haproxy/thread.h>
#include <haproxy/htx.h>
#include <proto/filters.h>
#include <haproxy/freq_ctr.h>
#include <proto/frontend.h>
-#include <proto/hlua.h>
#include <proto/http_rules.h>
#include <proto/listener.h>
#include <proto/log.h>
#include <haproxy/api.h>
#include <haproxy/chunk.h>
+#include <haproxy/hlua.h>
#include <haproxy/namespace.h>
#include <haproxy/tools.h>
#include <types/global.h>
#include <proto/applet.h>
#include <proto/dns.h>
-#include <proto/hlua.h>
#include <proto/listener.h>
#include <haproxy/proto_udp.h>
#include <proto/ssl_sock.h>