From 8718fda9b24fa148ffe1a06fb36a7aa2ed628bdc Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 25 Apr 2005 16:24:10 -0300 Subject: added LUAI_FUNC to functions not in the API --- luaconf.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'luaconf.h') diff --git a/luaconf.h b/luaconf.h index 6a571cbc..f7a6c0ec 100644 --- a/luaconf.h +++ b/luaconf.h @@ -1,5 +1,5 @@ /* -** $Id: luaconf.h,v 1.42 2005/04/07 13:09:07 roberto Exp roberto $ +** $Id: luaconf.h,v 1.43 2005/04/07 13:52:45 roberto Exp roberto $ ** Configuration file for Lua ** See Copyright Notice in lua.h */ @@ -117,6 +117,20 @@ #define LUALIB_API LUA_API +/* +@@ LUAI_FUNC is a mark for all extern functions that are not to be +@* exported to outside modules. +** CHANGE it if you need to mark them in some special way. Gcc mark +** them as "hidden" to optimize their call when Lua is compiled as a +** shared library. +*/ +#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) +#define LUAI_FUNC __attribute__((visibility("hidden"))) +#else +#define LUAI_FUNC extern +#endif + + /* @@ lua_assert describes the internal assertions in Lua. ** CHANGE that only if you need to debug Lua. -- cgit v1.2.3-55-g6feb