aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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