From: onefang Date: Sat, 19 Nov 2011 01:38:54 +0000 (+0000) Subject: Keep it clean. X-Git-Tag: submit/2.0alpha-wayland/20121127.221958~548 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=637085e480a2d9c006ff5ded7db236774cfa66c9;p=profile%2Fivi%2Fedje.git Keep it clean. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@65397 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/edje_lua2.c b/src/lib/edje_lua2.c index a7ab626..e3f13a3 100644 --- a/src/lib/edje_lua2.c +++ b/src/lib/edje_lua2.c @@ -377,7 +377,7 @@ _elua_push_name(lua_State *L, char *q, int index) // Stack usage [-0, +1, e or static int _elua_scan_params(lua_State *L, int i, Eina_Bool tr, char *params, ...) // Stack usage - // if i is a table - // [-0, +n, e] + // [-n, +n, e] // else // [-0, +0, -] // if tr @@ -423,7 +423,6 @@ _elua_scan_params(lua_State *L, int i, Eina_Bool tr, char *params, ...) // Stac *v = lua_tointeger(L, j); // Stack usage [-0, +0, -] n++; } -// FIXME: Should probably pop that name off the stack if it's a table. Same for the following. break; } case '#': @@ -487,6 +486,9 @@ _elua_scan_params(lua_State *L, int i, Eina_Bool tr, char *params, ...) // Stac { if (table) { + // If this is a table, then we pushed a value on the stack, pop it off. But only if not tr, coz otherwise the stack gets reset anyway. + if (!tr) + lua_pop(L, 1); // Stack usage [-n, +0, -] } else j++;