mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
REORG: include: move hlua.h to haproxy/hlua{,-t}.h
This one required a few more includes as it uses list and ebpt_node. It still references lots of types/ files for now.
This commit is contained in:
parent
87735330d1
commit
8641605ff6
@ -16,13 +16,13 @@
|
||||
#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>
|
||||
|
||||
|
@ -1,11 +1,35 @@
|
||||
#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>
|
||||
|
||||
@ -168,6 +192,7 @@ struct hlua_addr {
|
||||
};
|
||||
|
||||
#else /* USE_LUA */
|
||||
/************************ For use when Lua is disabled ********************/
|
||||
|
||||
/* Empty struct for compilation compatibility */
|
||||
struct hlua { };
|
||||
@ -176,4 +201,4 @@ struct hlua_rule { };
|
||||
|
||||
#endif /* USE_LUA */
|
||||
|
||||
#endif /* _TYPES_HLUA_H */
|
||||
#endif /* _HAPROXY_HLUA_T_H */
|
@ -1,12 +1,31 @@
|
||||
#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
|
||||
*/
|
||||
|
||||
#ifndef _HAPROXY_HLUA_H
|
||||
#define _HAPROXY_HLUA_H
|
||||
|
||||
#include <haproxy/hlua-t.h>
|
||||
|
||||
#ifdef USE_LUA
|
||||
|
||||
#include <lua.h>
|
||||
|
||||
#include <types/hlua.h>
|
||||
|
||||
/* The following macros are used to set flags. */
|
||||
#define HLUA_SET_RUN(__hlua) do {(__hlua)->flags |= HLUA_RUN;} while(0)
|
||||
#define HLUA_CLR_RUN(__hlua) do {(__hlua)->flags &= ~HLUA_RUN;} while(0)
|
||||
@ -33,6 +52,8 @@ struct task *hlua_process_task(struct task *task, void *context, unsigned short
|
||||
|
||||
#else /* USE_LUA */
|
||||
|
||||
/************************ For use when Lua is disabled ********************/
|
||||
|
||||
#define HLUA_IS_RUNNING(__hlua) 0
|
||||
|
||||
#define HLUA_INIT(__hlua)
|
||||
@ -44,4 +65,4 @@ static inline void hlua_ctx_destroy(struct hlua *lua) { }
|
||||
|
||||
#endif /* USE_LUA */
|
||||
|
||||
#endif /* _PROTO_HLUA_H */
|
||||
#endif /* _HAPROXY_HLUA_H */
|
@ -26,8 +26,8 @@
|
||||
#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>
|
||||
|
@ -30,11 +30,11 @@
|
||||
|
||||
#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>
|
||||
|
@ -22,6 +22,7 @@
|
||||
#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>
|
||||
@ -32,7 +33,6 @@
|
||||
|
||||
#include <proto/cli.h>
|
||||
#include <haproxy/fd.h>
|
||||
#include <proto/hlua.h>
|
||||
#include <proto/stream_interface.h>
|
||||
#include <proto/task.h>
|
||||
|
||||
|
@ -86,6 +86,7 @@
|
||||
#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>
|
||||
@ -115,7 +116,6 @@
|
||||
#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>
|
||||
|
@ -30,10 +30,10 @@
|
||||
#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>
|
||||
|
||||
@ -43,7 +43,6 @@
|
||||
#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>
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <lua.h>
|
||||
#include <lualib.h>
|
||||
|
||||
#include <haproxy/hlua-t.h>
|
||||
#include <haproxy/http.h>
|
||||
#include <haproxy/net_helper.h>
|
||||
#include <haproxy/regex.h>
|
||||
@ -25,7 +26,6 @@
|
||||
#include <common/uri_auth.h>
|
||||
|
||||
#include <types/cli.h>
|
||||
#include <types/hlua.h>
|
||||
#include <types/proxy.h>
|
||||
#include <types/stats.h>
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
#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>
|
||||
@ -45,7 +46,6 @@
|
||||
#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>
|
||||
|
@ -41,12 +41,12 @@
|
||||
|
||||
#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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user