summaryrefslogtreecommitdiff
path: root/src/bin/elua
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2015-04-08 14:46:31 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-06 15:05:18 +0100
commit17a54ff8e0b7c4430c510713ec636160175dbea8 (patch)
treeb35c1ab0bb9b6f3010524f14aae4aff8c8b08edd /src/bin/elua
parentc1487c8b11ebcca01c28111ac5dcf742e0e61276 (diff)
elua: use more Elua_State
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 43d62c6936..9750325ef8 100644
--- a/src/bin/elua/main.c
+++ b/src/bin/elua/main.c
@@ -85,8 +85,9 @@ elua_docall(Elua_State *es, int narg, int nret)
85} 85}
86 86
87static int 87static int
88elua_getargs(lua_State *L, int argc, char **argv, int n) 88elua_getargs(Elua_State *es, int argc, char **argv, int n)
89{ 89{
90 lua_State *L = es->luastate;
90 int i; 91 int i;
91 int narg = argc - (n + 1); 92 int narg = argc - (n + 1);
92 luaL_checkstack(L, narg + 3, "too many arguments to script"); 93 luaL_checkstack(L, narg + 3, "too many arguments to script");
@@ -235,7 +236,7 @@ elua_doscript(Elua_State *es, int argc, char **argv, int n, int *quit)
235 int status; 236 int status;
236 lua_State *L = es->luastate; 237 lua_State *L = es->luastate;
237 const char *fname = argv[n]; 238 const char *fname = argv[n];
238 int narg = elua_getargs(L, argc, argv, n); 239 int narg = elua_getargs(es, argc, argv, n);
239 lua_setglobal(L, "arg"); 240 lua_setglobal(L, "arg");
240 if (fname[0] == '-' && !fname[1]) 241 if (fname[0] == '-' && !fname[1])
241 { 242 {