summaryrefslogtreecommitdiff
path: root/lua.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-06-30 16:17:08 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-06-30 16:17:08 -0300
commitae55f3eeada102f3fa8345173410feaf1db42cde (patch)
treeeaddcc592b75b5035abc35ccd7fc99dd9aa95ea4 /lua.c
parentcfba57207660fd27ddac9ea51cdeb263c2d6b418 (diff)
downloadlua-github-ae55f3eeada102f3fa8345173410feaf1db42cde.tar.gz
no varargs in Lua API
Diffstat (limited to 'lua.c')
-rw-r--r--lua.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lua.c b/lua.c
index e128d4d6..3734f84e 100644
--- a/lua.c
+++ b/lua.c
@@ -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);