aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-10-21 08:58:58 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-10-21 08:58:58 -0200
commitd6d896b9532b3a88458a882690c56b391e1ecbc3 (patch)
tree6f7aaeffda192355effa61a7bf5963ec014c9808
parent07201066bd124976053e6a8ab63a0ce09f28d896 (diff)
downloadlua-d6d896b9532b3a88458a882690c56b391e1ecbc3.tar.gz
lua-d6d896b9532b3a88458a882690c56b391e1ecbc3.tar.bz2
lua-d6d896b9532b3a88458a882690c56b391e1ecbc3.zip
lua_set(get)global may use lua_set(get)field
-rw-r--r--lua.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/lua.h b/lua.h
index ee932062..efd633c5 100644
--- a/lua.h
+++ b/lua.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.h,v 1.182 2003/10/10 13:29:08 roberto Exp roberto $ 2** $Id: lua.h,v 1.183 2003/10/20 12:25:23 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
@@ -14,7 +14,7 @@
14#include <stddef.h> 14#include <stddef.h>
15 15
16 16
17#define LUA_VERSION "Lua 5.0" 17#define LUA_VERSION "Lua 5.1 (work)"
18#define LUA_COPYRIGHT "Copyright (C) 1994-2003 Tecgraf, PUC-Rio" 18#define LUA_COPYRIGHT "Copyright (C) 1994-2003 Tecgraf, PUC-Rio"
19#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes" 19#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes"
20 20
@@ -286,11 +286,8 @@ LUA_API lua_Alloc lua_getallocf (lua_State *L, void **ud);
286#define lua_open() luaL_newstate() 286#define lua_open() luaL_newstate()
287 287
288#define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX) 288#define lua_getregistry(L) lua_pushvalue(L, LUA_REGISTRYINDEX)
289#define lua_setglobal(L,s) \ 289#define lua_setglobal(L,s) lua_setfield(L, LUA_GLOBALSINDEX, s)
290 (lua_pushstring(L, s), lua_insert(L, -2), lua_settable(L, LUA_GLOBALSINDEX)) 290#define lua_getglobal(L,s) lua_getfield(L, LUA_GLOBALSINDEX, s)
291
292#define lua_getglobal(L,s) \
293 (lua_pushstring(L, s), lua_gettable(L, LUA_GLOBALSINDEX))
294 291
295 292
296/* compatibility with ref system */ 293/* compatibility with ref system */