aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compat.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compat.h b/src/compat.h
index 23dbc03..9e15230 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -318,8 +318,8 @@ inline void luaG_setfield(lua_State* const L_, int const idx_, std::string_view
318inline void luaG_setmetatable(lua_State* const L_, std::string_view const& tname_) 318inline void luaG_setmetatable(lua_State* const L_, std::string_view const& tname_)
319{ 319{
320 // fake externs to make clang happy... 320 // fake externs to make clang happy...
321 extern void luaL_setmetatable(lua_State* const L_, char const* const tname_); // Lua 5.2+ 321 if constexpr (LUA_VERSION_NUM > 501) {
322 if constexpr (LUA_VERSION_NUM == 501) { 322 extern void luaL_setmetatable(lua_State* const L_, char const* const tname_); // Lua 5.2+
323 luaL_setmetatable(L_, tname_.data()); 323 luaL_setmetatable(L_, tname_.data());
324 } else { 324 } else {
325 luaL_getmetatable(L_, tname_.data()); 325 luaL_getmetatable(L_, tname_.data());