diff options
| author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-07-29 16:21:51 +0200 |
|---|---|---|
| committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-07-29 16:21:51 +0200 |
| commit | 593036e1b9582e6cb012c8317ce2b8af2ba13831 (patch) | |
| tree | 48adf429b63fc2321fc9f37398f4a6ce9d0f8461 /src | |
| parent | 202355f9028ba04824de205f2b637c401d6989fa (diff) | |
| download | lanes-593036e1b9582e6cb012c8317ce2b8af2ba13831.tar.gz lanes-593036e1b9582e6cb012c8317ce2b8af2ba13831.tar.bz2 lanes-593036e1b9582e6cb012c8317ce2b8af2ba13831.zip | |
Fix luaG_setmetatable
Diffstat (limited to 'src')
| -rw-r--r-- | src/compat.h | 4 |
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 | |||
| 318 | inline void luaG_setmetatable(lua_State* const L_, std::string_view const& tname_) | 318 | inline 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()); |
