summaryrefslogtreecommitdiff
path: root/src/bin/elua
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2015-04-08 14:54:43 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-06 15:05:18 +0100
commit446fdd68c91930d47b41177a8188c4073f39c01f (patch)
treeeac58985e63b8cd20d70f35bb1ad27cb217b65b5 /src/bin/elua
parentcf98f846e90f3c48da7514f3f612bf4e351db5c5 (diff)
elua: Elua_state for elua_loadapp
Diffstat (limited to 'src/bin/elua')
-rw-r--r--src/bin/elua/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/elua/main.c b/src/bin/elua/main.c
index e184734784..81735218ad 100644
--- a/src/bin/elua/main.c
+++ b/src/bin/elua/main.c
@@ -216,8 +216,9 @@ elua_dostr(Elua_State *es, const char *chunk, const char *chname)
216} 216}
217 217
218static Eina_Bool 218static Eina_Bool
219elua_loadapp(lua_State *L, const char *appname) 219elua_loadapp(Elua_State *es, const char *appname)
220{ 220{
221 lua_State *L = es->luastate;
221 lua_rawgeti(L, LUA_REGISTRYINDEX, elua_appload_ref); 222 lua_rawgeti(L, LUA_REGISTRYINDEX, elua_appload_ref);
222 lua_pushstring(L, appname); 223 lua_pushstring(L, appname);
223 lua_call(L, 1, 2); 224 lua_call(L, 1, 2);
@@ -252,7 +253,7 @@ elua_doscript(Elua_State *es, int argc, char **argv, int n, int *quit)
252 status = elua_io_loadfile(L, fname); 253 status = elua_io_loadfile(L, fname);
253 } 254 }
254 else 255 else
255 status = !elua_loadapp(L, fname); 256 status = !elua_loadapp(es, fname);
256 } 257 }
257 else 258 else
258 { 259 {