equal
deleted
inserted
replaced
1 #include "lua_objs.h" |
1 #include "lua_objs.h" |
2 #include "lua_irc.h" |
2 #include "lua_irc.h" |
3 #include "lua_func.h" |
3 #include "lua_func.h" |
|
4 #include "lua_thread.h" |
4 #include "log.h" |
5 #include "log.h" |
5 |
6 |
6 #include <stdlib.h> |
7 #include <stdlib.h> |
7 #include <string.h> |
8 #include <string.h> |
8 |
9 |
371 // use a pure-timeout event |
372 // use a pure-timeout event |
372 if (event_base_once(lua_nexus->nexus->ev_base, -1, EV_TIMEOUT, lua_nexus_sleep_wakeup, L, &tv)) |
373 if (event_base_once(lua_nexus->nexus->ev_base, -1, EV_TIMEOUT, lua_nexus_sleep_wakeup, L, &tv)) |
373 return luaL_error(L, "event_base_once"); |
374 return luaL_error(L, "event_base_once"); |
374 |
375 |
375 // yield |
376 // yield |
376 return lua_yield(L, 0); |
377 return lua_thread_yield_state(L); |
377 } |
378 } |
378 |
379 |
379 static struct lua_method lua_nexus_methods[] = LUA_METHODS( |
380 static struct lua_method lua_nexus_methods[] = LUA_METHODS( |
380 LUA_METHOD("shutdown", lua_nexus_shutdown, NULL ), |
381 LUA_METHOD("shutdown", lua_nexus_shutdown, NULL ), |
381 LUA_METHOD("load_config", lua_nexus_load_config, NULL ), |
382 LUA_METHOD("load_config", lua_nexus_load_config, NULL ), |