From 30f6e658d2071d23309e4ac70dd8ec199049aff4 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 11 Sep 2000 16:42:57 -0300 Subject: [PATCH] `lua_newstate' renamed to `lua_open' --- lstate.c | 4 ++-- ltests.c | 4 ++-- lua.c | 4 ++-- lua.h | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lstate.c b/lstate.c index 1e35e467..44a9fc96 100644 --- a/lstate.c +++ b/lstate.c @@ -1,5 +1,5 @@ /* -** $Id: lstate.c,v 1.36 2000/09/05 19:33:32 roberto Exp roberto $ +** $Id: lstate.c,v 1.37 2000/09/11 17:38:42 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -25,7 +25,7 @@ void luaB_opentests (lua_State *L); #endif -lua_State *lua_newstate (int stacksize) { +lua_State *lua_open (int stacksize) { struct lua_longjmp myErrorJmp; lua_State *L = luaM_new(NULL, lua_State); if (L == NULL) return NULL; /* memory allocation error */ diff --git a/ltests.c b/ltests.c index 92c543d6..60079ce3 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 1.39 2000/08/31 20:23:40 roberto Exp roberto $ +** $Id: ltests.c,v 1.40 2000/09/05 19:33:32 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -267,7 +267,7 @@ static int udataval (lua_State *L) { } static int newstate (lua_State *L) { - lua_State *L1 = lua_newstate(luaL_check_int(L, 1)); + lua_State *L1 = lua_open(luaL_check_int(L, 1)); if (L1) lua_pushuserdata(L, L1); else diff --git a/lua.c b/lua.c index 05da8bfb..a9e98b33 100644 --- a/lua.c +++ b/lua.c @@ -1,5 +1,5 @@ /* -** $Id: lua.c,v 1.49 2000/08/31 20:23:40 roberto Exp roberto $ +** $Id: lua.c,v 1.50 2000/09/05 19:33:32 roberto Exp roberto $ ** Lua stand-alone interpreter ** See Copyright Notice in lua.h */ @@ -314,7 +314,7 @@ int main (int argc, char *argv[]) { int status; opt.toclose = 0; getstacksize(argc, argv, &opt); /* handle option `-s' */ - L = lua_newstate(opt.stacksize); /* create state */ + L = lua_open(opt.stacksize); /* create state */ USERINIT(); /* open libraries */ register_getargs(argv); /* create `getargs' function */ status = handle_argv(argv+1, &opt); diff --git a/lua.h b/lua.h index 2b51deab..11e5b555 100644 --- a/lua.h +++ b/lua.h @@ -1,5 +1,5 @@ /* -** $Id: lua.h,v 1.65 2000/08/31 21:01:43 roberto Exp roberto $ +** $Id: lua.h,v 1.66 2000/09/05 19:33:32 roberto Exp roberto $ ** Lua - An Extensible Extension Language ** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil ** e-mail: lua@tecgraf.puc-rio.br @@ -34,7 +34,7 @@ #define LUA_MULTRET (-1) -#define LUA_MINSTACK 16 +#define LUA_MINSTACK 20 /* error codes for lua_do* */ @@ -52,7 +52,7 @@ typedef int (*lua_CFunction) (lua_State *L); /* ** state manipulation */ -lua_State *lua_newstate (int stacksize); +lua_State *lua_open (int stacksize); void lua_close (lua_State *L);