diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-02-28 15:48:45 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-02-28 15:48:45 -0300 |
commit | cb88c1cd5d22fe7c56f4f374ded7c16f7cf14bf3 (patch) | |
tree | 6436299b5c8351f228798c4b82ea3e9a0a43072c | |
parent | ee99452158de5e2fa804bd10de7669848f3b3952 (diff) | |
download | lua-master.tar.gz lua-master.tar.bz2 lua-master.zip |
Added macro LUA_FAILISFALSE to make easier to change the fail value
from nil to false.
-rw-r--r-- | lauxlib.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -165,7 +165,11 @@ LUALIB_API void (luaL_requiref) (lua_State *L, const char *modname, | |||
165 | 165 | ||
166 | 166 | ||
167 | /* push the value used to represent failure/error */ | 167 | /* push the value used to represent failure/error */ |
168 | #if defined(LUA_FAILISFALSE) | ||
169 | #define luaL_pushfail(L) lua_pushboolean(L, 0) | ||
170 | #else | ||
168 | #define luaL_pushfail(L) lua_pushnil(L) | 171 | #define luaL_pushfail(L) lua_pushnil(L) |
172 | #endif | ||
169 | 173 | ||
170 | 174 | ||
171 | 175 | ||