aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-09-11 16:42:57 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-09-11 16:42:57 -0300
commit30f6e658d2071d23309e4ac70dd8ec199049aff4 (patch)
tree905c4d0db5ad6fd8fcf51d9542bd3751cc87a4be
parent787a78f83e0484c9e9698189982e2f309808fae8 (diff)
downloadlua-30f6e658d2071d23309e4ac70dd8ec199049aff4.tar.gz
lua-30f6e658d2071d23309e4ac70dd8ec199049aff4.tar.bz2
lua-30f6e658d2071d23309e4ac70dd8ec199049aff4.zip
`lua_newstate' renamed to `lua_open'
-rw-r--r--lstate.c4
-rw-r--r--ltests.c4
-rw-r--r--lua.c4
-rw-r--r--lua.h6
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 @@
1/* 1/*
2** $Id: lstate.c,v 1.36 2000/09/05 19:33:32 roberto Exp roberto $ 2** $Id: lstate.c,v 1.37 2000/09/11 17:38:42 roberto Exp roberto $
3** Global State 3** Global State
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -25,7 +25,7 @@ void luaB_opentests (lua_State *L);
25#endif 25#endif
26 26
27 27
28lua_State *lua_newstate (int stacksize) { 28lua_State *lua_open (int stacksize) {
29 struct lua_longjmp myErrorJmp; 29 struct lua_longjmp myErrorJmp;
30 lua_State *L = luaM_new(NULL, lua_State); 30 lua_State *L = luaM_new(NULL, lua_State);
31 if (L == NULL) return NULL; /* memory allocation error */ 31 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 @@
1/* 1/*
2** $Id: ltests.c,v 1.39 2000/08/31 20:23:40 roberto Exp roberto $ 2** $Id: ltests.c,v 1.40 2000/09/05 19:33:32 roberto Exp roberto $
3** Internal Module for Debugging of the Lua Implementation 3** Internal Module for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -267,7 +267,7 @@ static int udataval (lua_State *L) {
267} 267}
268 268
269static int newstate (lua_State *L) { 269static int newstate (lua_State *L) {
270 lua_State *L1 = lua_newstate(luaL_check_int(L, 1)); 270 lua_State *L1 = lua_open(luaL_check_int(L, 1));
271 if (L1) 271 if (L1)
272 lua_pushuserdata(L, L1); 272 lua_pushuserdata(L, L1);
273 else 273 else
diff --git a/lua.c b/lua.c
index 05da8bfb..a9e98b33 100644
--- a/lua.c
+++ b/lua.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.c,v 1.49 2000/08/31 20:23:40 roberto Exp roberto $ 2** $Id: lua.c,v 1.50 2000/09/05 19:33:32 roberto Exp roberto $
3** Lua stand-alone interpreter 3** Lua stand-alone interpreter
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -314,7 +314,7 @@ int main (int argc, char *argv[]) {
314 int status; 314 int status;
315 opt.toclose = 0; 315 opt.toclose = 0;
316 getstacksize(argc, argv, &opt); /* handle option `-s' */ 316 getstacksize(argc, argv, &opt); /* handle option `-s' */
317 L = lua_newstate(opt.stacksize); /* create state */ 317 L = lua_open(opt.stacksize); /* create state */
318 USERINIT(); /* open libraries */ 318 USERINIT(); /* open libraries */
319 register_getargs(argv); /* create `getargs' function */ 319 register_getargs(argv); /* create `getargs' function */
320 status = handle_argv(argv+1, &opt); 320 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 @@
1/* 1/*
2** $Id: lua.h,v 1.65 2000/08/31 21:01:43 roberto Exp roberto $ 2** $Id: lua.h,v 1.66 2000/09/05 19:33:32 roberto Exp roberto $
3** Lua - An Extensible Extension Language 3** Lua - An Extensible Extension Language
4** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil 4** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
5** e-mail: lua@tecgraf.puc-rio.br 5** e-mail: lua@tecgraf.puc-rio.br
@@ -34,7 +34,7 @@
34#define LUA_MULTRET (-1) 34#define LUA_MULTRET (-1)
35 35
36 36
37#define LUA_MINSTACK 16 37#define LUA_MINSTACK 20
38 38
39 39
40/* error codes for lua_do* */ 40/* error codes for lua_do* */
@@ -52,7 +52,7 @@ typedef int (*lua_CFunction) (lua_State *L);
52/* 52/*
53** state manipulation 53** state manipulation
54*/ 54*/
55lua_State *lua_newstate (int stacksize); 55lua_State *lua_open (int stacksize);
56void lua_close (lua_State *L); 56void lua_close (lua_State *L);
57 57
58 58