moonbridge
diff moonbridge.c @ 79:22dbb9d09f02
Stub for new non-blocking I/O library
author | jbe |
---|---|
date | Sun Apr 05 18:01:31 2015 +0200 (2015-04-05) |
parents | 0ec070d6f5d9 |
children | fca51922b708 |
line diff
1.1 --- a/moonbridge.c Sun Apr 05 15:15:06 2015 +0200 1.2 +++ b/moonbridge.c Sun Apr 05 18:01:31 2015 +0200 1.3 @@ -67,6 +67,11 @@ 1.4 #include <lualib.h> 1.5 1.6 1.7 +/*** Include directive for moonbridge_io library ***/ 1.8 + 1.9 +#include "moonbridge_io.h" 1.10 + 1.11 + 1.12 /*** Constants ***/ 1.13 1.14 /* Backlog option for listen() call */ 1.15 @@ -2758,6 +2763,14 @@ 1.16 lua_pushliteral(L, MOONBR_VERSION_STRING); 1.17 lua_setglobal(L, "_MOONBRIDGE_VERSION"); 1.18 luaL_openlibs(L); 1.19 + luaL_requiref(L, "moonbridge_io", luaopen_moonbridge_io, 0); 1.20 + lua_getglobal(L, "io"); 1.21 + for (lua_pushnil(L); lua_next(L, -3); lua_pop(L, 1)) { 1.22 + lua_pushvalue(L, -2); 1.23 + lua_pushvalue(L, -2); 1.24 + lua_settable(L, -5); 1.25 + } 1.26 + lua_pop(L, 2); 1.27 #ifdef MOONBR_LUA_PATH 1.28 moonbr_modify_path(L, "path", MOONBR_LUA_PATH); 1.29 #endif