diff options
Diffstat (limited to 'lua.h')
-rw-r--r-- | lua.h | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.h,v 1.184 2003/10/21 10:58:58 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.185 2003/11/05 11:59:14 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 |
@@ -258,10 +258,7 @@ LUA_API lua_Alloc lua_getallocf (lua_State *L, void **ud); | |||
258 | 258 | ||
259 | #define lua_newtable(L) lua_createtable(L, 0, 0) | 259 | #define lua_newtable(L) lua_createtable(L, 0, 0) |
260 | 260 | ||
261 | #define lua_register(L,n,f) \ | 261 | #define lua_register(L,n,f) (lua_pushcfunction(L,f), lua_setglobal(L,n)) |
262 | (lua_pushstring(L, n), \ | ||
263 | lua_pushcfunction(L, f), \ | ||
264 | lua_settable(L, LUA_GLOBALSINDEX)) | ||
265 | 262 | ||
266 | #define lua_pushcfunction(L,f) lua_pushcclosure(L, f, 0) | 263 | #define lua_pushcfunction(L,f) lua_pushcclosure(L, f, 0) |
267 | 264 | ||