diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-12-11 11:40:44 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-12-11 11:40:44 -0200 |
| commit | 2e5179259655ffd137067f5dc47803740b7937ac (patch) | |
| tree | 8d103b047f96fc93d77c9abd6c94458e8f9e5a7e /lua.h | |
| parent | 3a9ae612a4982e5f543baf8eead0889369eb8260 (diff) | |
| download | lua-2e5179259655ffd137067f5dc47803740b7937ac.tar.gz lua-2e5179259655ffd137067f5dc47803740b7937ac.tar.bz2 lua-2e5179259655ffd137067f5dc47803740b7937ac.zip | |
avoid using deprecated macros lua_[gs]etglobal
Diffstat (limited to 'lua.h')
| -rw-r--r-- | lua.h | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.h,v 1.251 2009/11/25 15:27:51 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.252 2009/11/26 11:39:20 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 |
| @@ -297,7 +297,8 @@ LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud); | |||
| 297 | 297 | ||
| 298 | #define lua_newtable(L) lua_createtable(L, 0, 0) | 298 | #define lua_newtable(L) lua_createtable(L, 0, 0) |
| 299 | 299 | ||
| 300 | #define lua_register(L,n,f) (lua_pushcfunction(L, (f)), lua_setglobal(L, (n))) | 300 | #define lua_register(L,n,f) \ |
| 301 | (lua_pushcfunction(L, (f)), lua_setfield(L, LUA_GLOBALSINDEX, (n))) | ||
| 301 | 302 | ||
| 302 | #define lua_pushcfunction(L,f) lua_pushcclosure(L, (f), 0) | 303 | #define lua_pushcfunction(L,f) lua_pushcclosure(L, (f), 0) |
| 303 | 304 | ||
