From cb88c1cd5d22fe7c56f4f374ded7c16f7cf14bf3 Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Fri, 28 Feb 2025 15:48:45 -0300
Subject: [PATCH] Detail

Added macro LUA_FAILISFALSE to make easier to change the fail value
from nil to false.
---
 lauxlib.h | 4 ++++
 1 file changed, 4 insertions(+)

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,
 
 
 /* push the value used to represent failure/error */
+#if defined(LUA_FAILISFALSE)
+#define luaL_pushfail(L)	lua_pushboolean(L, 0)
+#else
 #define luaL_pushfail(L)	lua_pushnil(L)
+#endif