From: Eduardo Felipe <eduardofelipe87@gmail.com>

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
This commit is contained in:
Eduardo Felipe 2010-05-20 04:48:17 +00:00 committed by Carsten Haitzler
parent 1ea1a6d3cc
commit 023da4d5ba
1 changed files with 1 additions and 1 deletions

View File

@ -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
/*