From: Eduardo Felipe Date: Thu, 20 May 2010 04:48:17 +0000 (+0000) Subject: From: Eduardo Felipe X-Git-Tag: submit/2.0alpha-wayland/20121127.221958~1291 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f25fb73b21dcf2fc9c6012031aa37e53e4743bb2;p=profile%2Fivi%2Fedje.git From: Eduardo Felipe Upon creating a timer, it's callback must return an int, otherwise it would panic. The python bindings do the nicety of, if the callback function returns nothing, automatically canceling the reschedule of the timer. This patch does the same for lua. It's a oneliner. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@49051 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/edje_lua.c b/src/lib/edje_lua.c index 685ef81..d0480fe 100644 --- a/src/lib/edje_lua.c +++ b/src/lib/edje_lua.c @@ -863,7 +863,7 @@ _edje_lua_timer_cb(void *data) return 0; } - res = luaL_checkint(L, -1); + res = luaL_optint(L, -1, ECORE_CALLBACK_CANCEL); lua_pop(L, 1); // -- res /*