aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-05-10 10:50:20 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-05-10 10:50:20 -0300
commit2d81cfa4e195a31d92d5ffff313918e4da549a71 (patch)
treeb676c79f6c61393284395ae56c32440afe186941
parent0bccf03d7e425d6f2d2ead6f49eb67016956b413 (diff)
downloadlua-2d81cfa4e195a31d92d5ffff313918e4da549a71.tar.gz
lua-2d81cfa4e195a31d92d5ffff313918e4da549a71.tar.bz2
lua-2d81cfa4e195a31d92d5ffff313918e4da549a71.zip
corrected definition of 'lua_register' (there is no LUA_ENVIRONINDEX
anymore)
-rw-r--r--lua.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/lua.h b/lua.h
index ea9d0f17..37525166 100644
--- a/lua.h
+++ b/lua.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.h,v 1.267 2010/04/12 16:04:10 roberto Exp roberto $ 2** $Id: lua.h,v 1.268 2010/04/14 15:14:21 roberto Exp roberto $
3** Lua - A Scripting Language 3** Lua - A Scripting Language
4** Lua.org, PUC-Rio, Brazil (http://www.lua.org) 4** Lua.org, PUC-Rio, Brazil (http://www.lua.org)
5** See Copyright Notice at the end of this file 5** See Copyright Notice at the end of this file
@@ -306,8 +306,7 @@ LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud);
306#define lua_getglobal(L,s) \ 306#define lua_getglobal(L,s) \
307 (lua_pushglobaltable(L), lua_getfield(L, -1, (s)), lua_remove(L, -2)) 307 (lua_pushglobaltable(L), lua_getfield(L, -1, (s)), lua_remove(L, -2))
308 308
309#define lua_register(L,n,f) \ 309#define lua_register(L,n,f) (lua_pushcfunction(L, (f)), lua_setglobal(L, (n)))
310 (lua_pushcfunction(L, (f)), lua_setfield(L, LUA_ENVIRONINDEX, (n)))
311 310
312#define lua_pushcfunction(L,f) lua_pushcclosure(L, (f), 0) 311#define lua_pushcfunction(L,f) lua_pushcclosure(L, (f), 0)
313 312