From 023da4d5ba374331fc17aea5a216ed7b22b16412 Mon Sep 17 00:00:00 2001 From: Eduardo Felipe Date: Thu, 20 May 2010 04:48:17 +0000 Subject: [PATCH] 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. SVN revision: 49051 --- legacy/edje/src/lib/edje_lua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/edje/src/lib/edje_lua.c b/legacy/edje/src/lib/edje_lua.c index 685ef81975..d0480fe360 100644 --- a/legacy/edje/src/lib/edje_lua.c +++ b/legacy/edje/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 /*