Hi folks! I know raster is working on rewriting lua, but still the timer API had a minor usability issue that I would like to see solved. 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. Thanks, Eduardo Felipe.
Index: src/lib/edje_lua.c =================================================================== --- src/lib/edje_lua.c (revision 48616) +++ src/lib/edje_lua.c (working copy) @@ -863,7 +863,7 @@ return 0; } - res = luaL_checkint(L, -1); + res = luaL_optint(L, -1, ECORE_CALLBACK_CANCEL); lua_pop(L, 1); // -- res /*
------------------------------------------------------------------------------
_______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel