added LUAI_FUNC to functions not in the API

This commit is contained in:
Roberto Ierusalimschy
2005-04-25 16:24:10 -03:00
parent 8c3c3e7691
commit 8718fda9b2
18 changed files with 180 additions and 161 deletions

View File

@@ -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.