aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-02-28 15:48:45 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-02-28 15:48:45 -0300
commitcb88c1cd5d22fe7c56f4f374ded7c16f7cf14bf3 (patch)
tree6436299b5c8351f228798c4b82ea3e9a0a43072c
parentee99452158de5e2fa804bd10de7669848f3b3952 (diff)
downloadlua-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.
Diffstat (limited to '')
-rw-r--r--lauxlib.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lauxlib.h b/lauxlib.h
index 4be008b9..d8522098 100644
--- a/lauxlib.h
+++ b/lauxlib.h
@@ -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