diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-10-21 11:47:42 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-10-21 11:47:42 -0200 |
commit | 053e87314596e48588a929791012def7818ec989 (patch) | |
tree | e5ce2b8bdf03da3dbdac087bf62824b49e7d40f0 /lauxlib.h | |
parent | 9f4211310fcea9ebf08f4884f8665520c1b8d85f (diff) | |
download | lua-053e87314596e48588a929791012def7818ec989.tar.gz lua-053e87314596e48588a929791012def7818ec989.tar.bz2 lua-053e87314596e48588a929791012def7818ec989.zip |
new macro luaL_opt to avoid evaluating defaults when no needed
Diffstat (limited to 'lauxlib.h')
-rw-r--r-- | lauxlib.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.h,v 1.84 2005/08/26 17:36:32 roberto Exp roberto $ | 2 | ** $Id: lauxlib.h,v 1.85 2005/09/06 17:19:51 roberto Exp roberto $ |
3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -114,6 +114,7 @@ LUALIB_API const char *(luaL_findtable) (lua_State *L, int idx, | |||
114 | 114 | ||
115 | #define luaL_getmetatable(L,n) (lua_getfield(L, LUA_REGISTRYINDEX, (n))) | 115 | #define luaL_getmetatable(L,n) (lua_getfield(L, LUA_REGISTRYINDEX, (n))) |
116 | 116 | ||
117 | #define luaL_opt(L,f,n,d) (lua_isnoneornil(L,(n)) ? (d) : f(L,(n))) | ||
117 | 118 | ||
118 | /* | 119 | /* |
119 | ** {====================================================== | 120 | ** {====================================================== |