diff options
author | Diego Nehab <diego.nehab@gmail.com> | 2019-03-11 00:08:41 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-11 00:08:41 -0300 |
commit | c89a931cc31f219d51dd32a8a253d5ee3fbd31be (patch) | |
tree | 1fc604d7cbd6a42c801b92b145651d91c458dfa2 /src/compat.c | |
parent | 2af4872a401cbd0c1255e19ee26620f0431dd9f5 (diff) | |
parent | 21514304be9e98a4386cb18542582068a59c5586 (diff) | |
download | luasocket-c89a931cc31f219d51dd32a8a253d5ee3fbd31be.tar.gz luasocket-c89a931cc31f219d51dd32a8a253d5ee3fbd31be.tar.bz2 luasocket-c89a931cc31f219d51dd32a8a253d5ee3fbd31be.zip |
Merge pull request #271 from ewestbrook/pragmavisibility
Use visibility pragma around declarations instead of attributes on definitions
Diffstat (limited to 'src/compat.c')
-rw-r--r-- | src/compat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compat.c b/src/compat.c index 1290f70..34ffdaf 100644 --- a/src/compat.c +++ b/src/compat.c | |||
@@ -2,10 +2,11 @@ | |||
2 | #include "compat.h" | 2 | #include "compat.h" |
3 | 3 | ||
4 | #if LUA_VERSION_NUM==501 | 4 | #if LUA_VERSION_NUM==501 |
5 | |||
5 | /* | 6 | /* |
6 | ** Adapted from Lua 5.2 | 7 | ** Adapted from Lua 5.2 |
7 | */ | 8 | */ |
8 | LUASOCKET_PRIVATE void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { | 9 | void luasocket_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { |
9 | luaL_checkstack(L, nup+1, "too many upvalues"); | 10 | luaL_checkstack(L, nup+1, "too many upvalues"); |
10 | for (; l->name != NULL; l++) { /* fill the table with given functions */ | 11 | for (; l->name != NULL; l++) { /* fill the table with given functions */ |
11 | int i; | 12 | int i; |
@@ -21,7 +22,7 @@ LUASOCKET_PRIVATE void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) | |||
21 | /* | 22 | /* |
22 | ** Duplicated from Lua 5.2 | 23 | ** Duplicated from Lua 5.2 |
23 | */ | 24 | */ |
24 | LUASOCKET_PRIVATE void *luaL_testudata (lua_State *L, int ud, const char *tname) { | 25 | void *luasocket_testudata (lua_State *L, int ud, const char *tname) { |
25 | void *p = lua_touserdata(L, ud); | 26 | void *p = lua_touserdata(L, ud); |
26 | if (p != NULL) { /* value is a userdata? */ | 27 | if (p != NULL) { /* value is a userdata? */ |
27 | if (lua_getmetatable(L, ud)) { /* does it have a metatable? */ | 28 | if (lua_getmetatable(L, ud)) { /* does it have a metatable? */ |