diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-06-30 16:17:08 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-06-30 16:17:08 -0300 |
commit | ae55f3eeada102f3fa8345173410feaf1db42cde (patch) | |
tree | eaddcc592b75b5035abc35ccd7fc99dd9aa95ea4 /lua.c | |
parent | cfba57207660fd27ddac9ea51cdeb263c2d6b418 (diff) | |
download | lua-github-ae55f3eeada102f3fa8345173410feaf1db42cde.tar.gz |
no varargs in Lua API
Diffstat (limited to 'lua.c')
-rw-r--r-- | lua.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1,5 +1,5 @@ /* -** $Id: lua.c,v 1.40 2000/06/16 17:16:34 roberto Exp roberto $ +** $Id: lua.c,v 1.41 2000/06/19 13:15:15 roberto Exp roberto $ ** Lua stand-alone interpreter ** See Copyright Notice in lua.h */ @@ -175,17 +175,16 @@ int main (int argc, char *argv[]) { int toclose = 0; int status = EXIT_SUCCESS; int i = 1; + int stacksize = 0; if (i < argc && argv[1][0] == '-' && argv[1][1] == 's') { - int stacksize = atoi(&argv[1][2]); + stacksize = atoi(&argv[1][2]); if (stacksize == 0) { fprintf(stderr, "lua: invalid stack size ('%s')\n", &argv[1][2]); exit(EXIT_FAILURE); } i++; - lua_state = lua_newstate("stack", stacksize, NULL); } - else - lua_state = lua_newstate(NULL); + lua_state = lua_newstate(stacksize, 1); lua_userinit(); lua_pushuserdata(argv); lua_pushcclosure(l_getargs, 1); |