export 2 compiletime constants. Fixes #129
This commit is contained in:
parent
321c0c9b1f
commit
a219aca07f
2 changed files with 6 additions and 0 deletions
|
@ -40,6 +40,9 @@ int select_open(lua_State *L) {
|
|||
lua_pushstring(L, "_SETSIZE");
|
||||
lua_pushnumber(L, FD_SETSIZE);
|
||||
lua_rawset(L, -3);
|
||||
lua_pushstring(L, "_SOCKETINVALID"); // for use with getfd() and setfd()
|
||||
lua_pushnumber(L, SOCKET_INVALID);
|
||||
lua_rawset(L, -3);
|
||||
#if LUA_VERSION_NUM > 501 && !defined(LUA_COMPAT_MODULE)
|
||||
luaL_setfuncs(L, func, 0);
|
||||
#else
|
||||
|
|
|
@ -120,6 +120,9 @@ int udp_open(lua_State *L)
|
|||
auxiliar_add2group(L, "udp{connected}", "select{able}");
|
||||
auxiliar_add2group(L, "udp{unconnected}", "select{able}");
|
||||
/* define library functions */
|
||||
lua_pushstring(L, "_UDPDATAGRAMSIZE"); // max send/receive size
|
||||
lua_pushnumber(L, UDP_DATAGRAMSIZE);
|
||||
lua_rawset(L, -3);
|
||||
#if LUA_VERSION_NUM > 501 && !defined(LUA_COMPAT_MODULE)
|
||||
luaL_setfuncs(L, func, 0);
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue