aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-02-15 06:22:58 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-02-15 06:22:58 +0500
commit2129e6154e3b48ef9568242af5d74c990c55dd6f (patch)
tree748c610ea5697129551c858eb3a900da6254ff63
parent6da15fb55e02f36b8b38f659466fa0f213392179 (diff)
downloadluaevent-prosody-2129e6154e3b48ef9568242af5d74c990c55dd6f.tar.gz
luaevent-prosody-2129e6154e3b48ef9568242af5d74c990c55dd6f.zip
luaevent.c: Make ANSI C compatible.
-rw-r--r--src/luaevent.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/luaevent.c b/src/luaevent.c
index a8d5f7d..19fb7d6 100644
--- a/src/luaevent.c
+++ b/src/luaevent.c
@@ -91,19 +91,21 @@ static int luaevent_addevent(lua_State* L) {
}
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;
}