# HG changeset patch # User Waqas Hussain # Date 1266196978 -18000 # Node ID 5a5f46aed0c1a0561a7fd0c48798fa62e443415f # Parent 8f1e69d846c1a94767090103cb7d2ad73f1fed16 luaevent.c: Make ANSI C compatible. diff -r 8f1e69d846c1 -r 5a5f46aed0c1 src/luaevent.c --- a/src/luaevent.c Mon Jan 18 13:16:06 2010 -0500 +++ b/src/luaevent.c Mon Feb 15 06:22:58 2010 +0500 @@ -91,19 +91,21 @@ } static int luaevent_loop(lua_State* L) { + int ret; le_base *base = event_base_get(L, 1); base->loop_L = L; - int ret = event_base_loop(base->base, 0); + ret = event_base_loop(base->base, 0); lua_pushinteger(L, ret); return 1; } static int luaevent_loopexit(lua_State*L) { + int ret; le_base *base = event_base_get(L, 1); struct timeval tv = { 0, 0 }; if(lua_gettop(L) >= 2) /* Optional timeout before exiting the loop */ load_timeval(luaL_checknumber(L, 2), &tv); - int ret = event_base_loopexit(base->base, &tv); + ret = event_base_loopexit(base->base, &tv); lua_pushinteger(L, ret); return 1; }