c4625457d05234f13c184eda170b74546c44fede
1 /* LuaEvent - Copyright (C) 2007,2012 Thomas Harning <harningt@gmail.com>
2 * Licensed as LGPL - See doc/COPYING for details */
8 /* Workarounds for Lua 5.2 */
9 #if (LUA_VERSION_NUM == 502)
12 #define lua_equal(L,idx1,idx2) lua_compare(L, (idx1), (idx2), LUA_OPEQ)
15 #define lua_getfenv lua_getuservalue
17 #define lua_setfenv lua_setuservalue
20 #define lua_objlen lua_rawlen
23 #define luaL_register(L, n, f) \
24 { if ((n) == NULL) luaL_setfuncs(L, f, 0); else luaL_newlib(L, f); }
28 #include <sys/types.h>
37 struct event_base
* base
;
41 le_base
* event_base_get(lua_State
* L
, int idx
);
42 void load_timeval(double time
, struct timeval
*tv
);
43 int getSocketFd(lua_State
* L
, int idx
);
45 int luaopen_luaevent(lua_State
* L
);