diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-20 17:41:46 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-20 17:41:46 -0300 |
commit | 3941af53adee868e2cccfb9b85783aba9ac311c1 (patch) | |
tree | 8b6295c8aefacf286c13c7d78b1d2a91421ce2b1 /lua.h | |
parent | 5610fdd776edd0de71864f79d50b4526df861d75 (diff) | |
download | lua-3941af53adee868e2cccfb9b85783aba9ac311c1.tar.gz lua-3941af53adee868e2cccfb9b85783aba9ac311c1.tar.bz2 lua-3941af53adee868e2cccfb9b85783aba9ac311c1.zip |
first implementation of independent global table per function
Diffstat (limited to 'lua.h')
-rw-r--r-- | lua.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.h,v 1.140 2002/06/13 13:44:50 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.141 2002/06/18 15:19:27 roberto Exp roberto $ |
3 | ** Lua - An Extensible Extension Language | 3 | ** Lua - An Extensible Extension Language |
4 | ** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil | 4 | ** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil |
5 | ** http://www.lua.org mailto:info@lua.org | 5 | ** http://www.lua.org mailto:info@lua.org |
@@ -169,6 +169,7 @@ LUA_API void lua_rawget (lua_State *L, int index); | |||
169 | LUA_API void lua_rawgeti (lua_State *L, int index, int n); | 169 | LUA_API void lua_rawgeti (lua_State *L, int index, int n); |
170 | LUA_API void lua_newtable (lua_State *L); | 170 | LUA_API void lua_newtable (lua_State *L); |
171 | LUA_API int lua_getmetatable (lua_State *L, int objindex); | 171 | LUA_API int lua_getmetatable (lua_State *L, int objindex); |
172 | LUA_API void lua_getglobals (lua_State *L, int level); | ||
172 | 173 | ||
173 | 174 | ||
174 | /* | 175 | /* |
@@ -177,7 +178,8 @@ LUA_API int lua_getmetatable (lua_State *L, int objindex); | |||
177 | LUA_API void lua_settable (lua_State *L, int index); | 178 | LUA_API void lua_settable (lua_State *L, int index); |
178 | LUA_API void lua_rawset (lua_State *L, int index); | 179 | LUA_API void lua_rawset (lua_State *L, int index); |
179 | LUA_API void lua_rawseti (lua_State *L, int index, int n); | 180 | LUA_API void lua_rawseti (lua_State *L, int index, int n); |
180 | LUA_API void lua_setmetatable (lua_State *L, int objindex); | 181 | LUA_API int lua_setmetatable (lua_State *L, int objindex); |
182 | LUA_API int lua_setglobals (lua_State *L, int level); | ||
181 | 183 | ||
182 | 184 | ||
183 | /* | 185 | /* |
@@ -259,8 +261,6 @@ LUA_API void *lua_newuserdata (lua_State *L, size_t size); | |||
259 | LUA_API int lua_pushupvalues (lua_State *L); | 261 | LUA_API int lua_pushupvalues (lua_State *L); |
260 | 262 | ||
261 | #define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX) | 263 | #define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX) |
262 | #define lua_getglobals(L) lua_pushvalue(L, LUA_GLOBALSINDEX) | ||
263 | #define lua_setglobals(L) lua_replace(L, LUA_GLOBALSINDEX) | ||
264 | #define lua_setglobal(L,s) \ | 264 | #define lua_setglobal(L,s) \ |
265 | (lua_pushstring(L, s), lua_insert(L, -2), lua_settable(L, LUA_GLOBALSINDEX)) | 265 | (lua_pushstring(L, s), lua_insert(L, -2), lua_settable(L, LUA_GLOBALSINDEX)) |
266 | 266 | ||