From 59744f03112d4d0a3b589d99c780c24186e277fc Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 1 Apr 1997 16:02:43 -0300 Subject: [PATCH] "storeglobal" changed to "setglobal" --- inout.c | 6 +++--- lua.h | 11 ++++++----- opcode.c | 12 ++++++------ 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/inout.c b/inout.c index a30659ce..fe45c421 100644 --- a/inout.c +++ b/inout.c @@ -5,7 +5,7 @@ ** Also provides some predefined lua functions. */ -char *rcs_inout="$Id: inout.c,v 2.50 1997/03/31 20:59:09 roberto Exp roberto $"; +char *rcs_inout="$Id: inout.c,v 2.51 1997/04/01 17:31:42 roberto Exp roberto $"; #include #include @@ -190,7 +190,7 @@ static void luaI_setglobal (void) lua_Object value = lua_getparam(2); luaL_arg_check(value != LUA_NOOBJECT, "setglobal", 2, NULL); lua_pushobject(value); - lua_storeglobal(luaL_check_string(1, "setglobal")); + lua_setglobal(luaL_check_string(1, "setglobal")); lua_pushobject(value); /* return given value */ } @@ -199,7 +199,7 @@ static void luaI_basicsetglobal (void) lua_Object value = lua_getparam(2); luaL_arg_check(value != LUA_NOOBJECT, "basicsetglobal", 2, NULL); lua_pushobject(value); - lua_basicstoreglobal(luaL_check_string(1, "basicsetglobal")); + lua_basicsetglobal(luaL_check_string(1, "basicsetglobal")); lua_pushobject(value); /* return given value */ } diff --git a/lua.h b/lua.h index 57830a05..34414ca4 100644 --- a/lua.h +++ b/lua.h @@ -2,15 +2,15 @@ ** LUA - Linguagem para Usuarios de Aplicacao ** Grupo de Tecnologia em Computacao Grafica ** TeCGraf - PUC-Rio -** $Id: lua.h,v 3.37 1997/03/19 19:41:10 roberto Exp roberto $ +** $Id: lua.h,v 3.38 1997/03/31 20:59:09 roberto Exp roberto $ */ #ifndef lua_h #define lua_h -#define LUA_VERSION "Lua 2.?" -#define LUA_COPYRIGHT "Copyright (C) 1994-1996 TeCGraf" +#define LUA_VERSION "Lua 3.0 (alpha)" +#define LUA_COPYRIGHT "Copyright (C) 1994-1997 TeCGraf" #define LUA_AUTHORS "W. Celes, R. Ierusalimschy & L. H. de Figueiredo" @@ -65,8 +65,8 @@ void lua_pushobject (lua_Object object); lua_Object lua_getglobal (char *name); lua_Object lua_basicgetglobal (char *name); -void lua_storeglobal (char *name); /* In: value */ -void lua_basicstoreglobal (char *name); /* In: value */ +void lua_setglobal (char *name); /* In: value */ +void lua_basicsetglobal (char *name); /* In: value */ void lua_storesubscript (void); /* In: table, index, value */ void lua_basicstoreindex (void); /* In: table, index, value */ @@ -97,6 +97,7 @@ lua_Object lua_createtable (void); /* =============================================================== */ /* for compatibility with old versions. Avoid using these macros */ +#define lua_storeglobal(n) lua_setglobal(n) #define lua_type(o) (lua_tag(o)) #define lua_getuserdata(o) (*(void **)lua_getbinarydata(o)) diff --git a/opcode.c b/opcode.c index 615ea1ed..cde3dcdc 100644 --- a/opcode.c +++ b/opcode.c @@ -3,7 +3,7 @@ ** TecCGraf - PUC-Rio */ -char *rcs_opcode="$Id: opcode.c,v 3.88 1997/03/31 14:17:09 roberto Exp roberto $"; +char *rcs_opcode="$Id: opcode.c,v 3.89 1997/03/31 20:59:09 roberto Exp roberto $"; #include #include @@ -898,7 +898,7 @@ lua_Object lua_basicgetglobal (char *name) /* ** Store top of the stack at a global variable array field. */ -static void storeglobal (Word n) +static void setglobal (Word n) { TObject *oldvalue = &lua_table[n].object; TObject *im = luaI_getimbyObj(oldvalue, IM_SETGLOBAL); @@ -917,13 +917,13 @@ static void storeglobal (Word n) } -void lua_storeglobal (char *name) +void lua_setglobal (char *name) { adjustC(1); - storeglobal(luaI_findsymbolbyname(name)); + setglobal(luaI_findsymbolbyname(name)); } -void lua_basicstoreglobal (char *name) +void lua_basicsetglobal (char *name) { Word n = luaI_findsymbolbyname(name); adjustC(1); @@ -1229,7 +1229,7 @@ static StkId lua_execute (Byte *pc, StkId base) { Word w; get_word(w,pc); - storeglobal(w); + setglobal(w); } break;