Skip to content

Commit fa2fd23

Browse files
committed
Fix Linux
1 parent 948e4e4 commit fa2fd23

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

Shared/mods/deathmatch/logic/lua/CLuaFunctionParser.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <optional>
1212
#include <variant>
1313
#include <SharedUtil.Template.h>
14+
#include "lua/CLuaFunctionParseHelpers.h"
1415
#include "lua/LuaBasic.h"
1516

1617
template <bool, auto*>
@@ -240,7 +241,7 @@ struct CLuaFunctionParser<ErrorOnFailure, Func>
240241
else if constexpr (std::is_pointer_v<T> && std::is_class_v<std::remove_pointer_t<T>>)
241242
{
242243
bool isLightUserData = lua_type(L, index) == LUA_TLIGHTUSERDATA;
243-
void* pValue = PopTrivial<void*>(L, index);
244+
void* pValue = lua::PopTrivial<void*>(L, index);
244245
using class_t = std::remove_pointer_t<T>;
245246
T result = nullptr;
246247
if (isLightUserData)

Shared/mods/deathmatch/logic/lua/LuaBasic.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ namespace lua
3030
// The return value must be the amount of items pushed to the stack, which should
3131
// be 1 for trivial types (e.g. Push<int>) but may be any number for special cases
3232
// like tuples
33+
34+
int Push(lua_State* L, int val);
35+
int Push(lua_State* L, const std::string& val);
36+
int Push(lua_State* L, bool val);
37+
int Push(lua_State* L, std::nullptr_t);
38+
int Push(lua_State* L, float val);
39+
int Push(lua_State* L, double val);
40+
int Push(lua_State* L, unsigned int val);
41+
int Push(lua_State* L, unsigned short val);
42+
3343

3444
template <typename... Ts>
3545
int Push(lua_State* L, const std::variant<Ts...>&& val)
@@ -86,12 +96,4 @@ namespace lua
8696
return 1;
8797
}
8898

89-
int Push(lua_State* L, int val);
90-
int Push(lua_State* L, const std::string& val);
91-
int Push(lua_State* L, bool val);
92-
int Push(lua_State* L, nullptr_t);
93-
int Push(lua_State* L, float val);
94-
int Push(lua_State* L, double val);
95-
int Push(lua_State* L, unsigned int val);
96-
int Push(lua_State* L, unsigned short val);
9799
}

0 commit comments

Comments
 (0)