elua: use more Elua_State

This commit is contained in:
Daniel Kolesa 2015-04-08 14:46:31 +01:00 committed by Daniel Kolesa
parent c1487c8b11
commit 17a54ff8e0
1 changed files with 3 additions and 2 deletions

View File

@ -85,8 +85,9 @@ elua_docall(Elua_State *es, int narg, int nret)
}
static int
elua_getargs(lua_State *L, int argc, char **argv, int n)
elua_getargs(Elua_State *es, int argc, char **argv, int n)
{
lua_State *L = es->luastate;
int i;
int narg = argc - (n + 1);
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)
int status;
lua_State *L = es->luastate;
const char *fname = argv[n];
int narg = elua_getargs(L, argc, argv, n);
int narg = elua_getargs(es, argc, argv, n);
lua_setglobal(L, "arg");
if (fname[0] == '-' && !fname[1])
{