diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-04-01 16:02:43 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-04-01 16:02:43 -0300 |
commit | 59744f03112d4d0a3b589d99c780c24186e277fc (patch) | |
tree | fde44ed71f6eb111d677fc7f929acd2ed5088929 | |
parent | bb2e2bec18a322c27066c5898a239129cee46ec9 (diff) | |
download | lua-59744f03112d4d0a3b589d99c780c24186e277fc.tar.gz lua-59744f03112d4d0a3b589d99c780c24186e277fc.tar.bz2 lua-59744f03112d4d0a3b589d99c780c24186e277fc.zip |
"storeglobal" changed to "setglobal"
-rw-r--r-- | inout.c | 6 | ||||
-rw-r--r-- | lua.h | 11 | ||||
-rw-r--r-- | opcode.c | 12 |
3 files changed, 15 insertions, 14 deletions
@@ -5,7 +5,7 @@ | |||
5 | ** Also provides some predefined lua functions. | 5 | ** Also provides some predefined lua functions. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | char *rcs_inout="$Id: inout.c,v 2.50 1997/03/31 20:59:09 roberto Exp roberto $"; | 8 | char *rcs_inout="$Id: inout.c,v 2.51 1997/04/01 17:31:42 roberto Exp roberto $"; |
9 | 9 | ||
10 | #include <stdio.h> | 10 | #include <stdio.h> |
11 | #include <string.h> | 11 | #include <string.h> |
@@ -190,7 +190,7 @@ static void luaI_setglobal (void) | |||
190 | lua_Object value = lua_getparam(2); | 190 | lua_Object value = lua_getparam(2); |
191 | luaL_arg_check(value != LUA_NOOBJECT, "setglobal", 2, NULL); | 191 | luaL_arg_check(value != LUA_NOOBJECT, "setglobal", 2, NULL); |
192 | lua_pushobject(value); | 192 | lua_pushobject(value); |
193 | lua_storeglobal(luaL_check_string(1, "setglobal")); | 193 | lua_setglobal(luaL_check_string(1, "setglobal")); |
194 | lua_pushobject(value); /* return given value */ | 194 | lua_pushobject(value); /* return given value */ |
195 | } | 195 | } |
196 | 196 | ||
@@ -199,7 +199,7 @@ static void luaI_basicsetglobal (void) | |||
199 | lua_Object value = lua_getparam(2); | 199 | lua_Object value = lua_getparam(2); |
200 | luaL_arg_check(value != LUA_NOOBJECT, "basicsetglobal", 2, NULL); | 200 | luaL_arg_check(value != LUA_NOOBJECT, "basicsetglobal", 2, NULL); |
201 | lua_pushobject(value); | 201 | lua_pushobject(value); |
202 | lua_basicstoreglobal(luaL_check_string(1, "basicsetglobal")); | 202 | lua_basicsetglobal(luaL_check_string(1, "basicsetglobal")); |
203 | lua_pushobject(value); /* return given value */ | 203 | lua_pushobject(value); /* return given value */ |
204 | } | 204 | } |
205 | 205 | ||
@@ -2,15 +2,15 @@ | |||
2 | ** LUA - Linguagem para Usuarios de Aplicacao | 2 | ** LUA - Linguagem para Usuarios de Aplicacao |
3 | ** Grupo de Tecnologia em Computacao Grafica | 3 | ** Grupo de Tecnologia em Computacao Grafica |
4 | ** TeCGraf - PUC-Rio | 4 | ** TeCGraf - PUC-Rio |
5 | ** $Id: lua.h,v 3.37 1997/03/19 19:41:10 roberto Exp roberto $ | 5 | ** $Id: lua.h,v 3.38 1997/03/31 20:59:09 roberto Exp roberto $ |
6 | */ | 6 | */ |
7 | 7 | ||
8 | 8 | ||
9 | #ifndef lua_h | 9 | #ifndef lua_h |
10 | #define lua_h | 10 | #define lua_h |
11 | 11 | ||
12 | #define LUA_VERSION "Lua 2.?" | 12 | #define LUA_VERSION "Lua 3.0 (alpha)" |
13 | #define LUA_COPYRIGHT "Copyright (C) 1994-1996 TeCGraf" | 13 | #define LUA_COPYRIGHT "Copyright (C) 1994-1997 TeCGraf" |
14 | #define LUA_AUTHORS "W. Celes, R. Ierusalimschy & L. H. de Figueiredo" | 14 | #define LUA_AUTHORS "W. Celes, R. Ierusalimschy & L. H. de Figueiredo" |
15 | 15 | ||
16 | 16 | ||
@@ -65,8 +65,8 @@ void lua_pushobject (lua_Object object); | |||
65 | 65 | ||
66 | lua_Object lua_getglobal (char *name); | 66 | lua_Object lua_getglobal (char *name); |
67 | lua_Object lua_basicgetglobal (char *name); | 67 | lua_Object lua_basicgetglobal (char *name); |
68 | void lua_storeglobal (char *name); /* In: value */ | 68 | void lua_setglobal (char *name); /* In: value */ |
69 | void lua_basicstoreglobal (char *name); /* In: value */ | 69 | void lua_basicsetglobal (char *name); /* In: value */ |
70 | 70 | ||
71 | void lua_storesubscript (void); /* In: table, index, value */ | 71 | void lua_storesubscript (void); /* In: table, index, value */ |
72 | void lua_basicstoreindex (void); /* In: table, index, value */ | 72 | void lua_basicstoreindex (void); /* In: table, index, value */ |
@@ -97,6 +97,7 @@ lua_Object lua_createtable (void); | |||
97 | /* =============================================================== */ | 97 | /* =============================================================== */ |
98 | /* for compatibility with old versions. Avoid using these macros */ | 98 | /* for compatibility with old versions. Avoid using these macros */ |
99 | 99 | ||
100 | #define lua_storeglobal(n) lua_setglobal(n) | ||
100 | #define lua_type(o) (lua_tag(o)) | 101 | #define lua_type(o) (lua_tag(o)) |
101 | 102 | ||
102 | #define lua_getuserdata(o) (*(void **)lua_getbinarydata(o)) | 103 | #define lua_getuserdata(o) (*(void **)lua_getbinarydata(o)) |
@@ -3,7 +3,7 @@ | |||
3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_opcode="$Id: opcode.c,v 3.88 1997/03/31 14:17:09 roberto Exp roberto $"; | 6 | char *rcs_opcode="$Id: opcode.c,v 3.89 1997/03/31 20:59:09 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <setjmp.h> | 8 | #include <setjmp.h> |
9 | #include <stdio.h> | 9 | #include <stdio.h> |
@@ -898,7 +898,7 @@ lua_Object lua_basicgetglobal (char *name) | |||
898 | /* | 898 | /* |
899 | ** Store top of the stack at a global variable array field. | 899 | ** Store top of the stack at a global variable array field. |
900 | */ | 900 | */ |
901 | static void storeglobal (Word n) | 901 | static void setglobal (Word n) |
902 | { | 902 | { |
903 | TObject *oldvalue = &lua_table[n].object; | 903 | TObject *oldvalue = &lua_table[n].object; |
904 | TObject *im = luaI_getimbyObj(oldvalue, IM_SETGLOBAL); | 904 | TObject *im = luaI_getimbyObj(oldvalue, IM_SETGLOBAL); |
@@ -917,13 +917,13 @@ static void storeglobal (Word n) | |||
917 | } | 917 | } |
918 | 918 | ||
919 | 919 | ||
920 | void lua_storeglobal (char *name) | 920 | void lua_setglobal (char *name) |
921 | { | 921 | { |
922 | adjustC(1); | 922 | adjustC(1); |
923 | storeglobal(luaI_findsymbolbyname(name)); | 923 | setglobal(luaI_findsymbolbyname(name)); |
924 | } | 924 | } |
925 | 925 | ||
926 | void lua_basicstoreglobal (char *name) | 926 | void lua_basicsetglobal (char *name) |
927 | { | 927 | { |
928 | Word n = luaI_findsymbolbyname(name); | 928 | Word n = luaI_findsymbolbyname(name); |
929 | adjustC(1); | 929 | adjustC(1); |
@@ -1229,7 +1229,7 @@ static StkId lua_execute (Byte *pc, StkId base) | |||
1229 | { | 1229 | { |
1230 | Word w; | 1230 | Word w; |
1231 | get_word(w,pc); | 1231 | get_word(w,pc); |
1232 | storeglobal(w); | 1232 | setglobal(w); |
1233 | } | 1233 | } |
1234 | break; | 1234 | break; |
1235 | 1235 | ||