mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-26 04:28:20 +01:00
pragma.c: use LUASOCKET_PRIVATE
This commit is contained in:
parent
b95527e140
commit
2bf6730fd5
@ -1,10 +1,11 @@
|
|||||||
|
#include "luasocket.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
|
|
||||||
#if LUA_VERSION_NUM==501
|
#if LUA_VERSION_NUM==501
|
||||||
/*
|
/*
|
||||||
** Adapted from Lua 5.2
|
** Adapted from Lua 5.2
|
||||||
*/
|
*/
|
||||||
void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) {
|
LUASOCKET_PRIVATE void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) {
|
||||||
luaL_checkstack(L, nup+1, "too many upvalues");
|
luaL_checkstack(L, nup+1, "too many upvalues");
|
||||||
for (; l->name != NULL; l++) { /* fill the table with given functions */
|
for (; l->name != NULL; l++) { /* fill the table with given functions */
|
||||||
int i;
|
int i;
|
||||||
@ -20,7 +21,7 @@ void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) {
|
|||||||
/*
|
/*
|
||||||
** Duplicated from Lua 5.2
|
** Duplicated from Lua 5.2
|
||||||
*/
|
*/
|
||||||
void *luaL_testudata (lua_State *L, int ud, const char *tname) {
|
LUASOCKET_PRIVATE void *luaL_testudata (lua_State *L, int ud, const char *tname) {
|
||||||
void *p = lua_touserdata(L, ud);
|
void *p = lua_touserdata(L, ud);
|
||||||
if (p != NULL) { /* value is a userdata? */
|
if (p != NULL) { /* value is a userdata? */
|
||||||
if (lua_getmetatable(L, ud)) { /* does it have a metatable? */
|
if (lua_getmetatable(L, ud)) { /* does it have a metatable? */
|
||||||
|
Loading…
Reference in New Issue
Block a user