mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
test fix: declare sol_lua_* of ThisPluginState inside chatterino::lua ns
This commit is contained in:
parent
57a5e23a69
commit
374cef51cc
|
@ -98,6 +98,8 @@ int sol_lua_push(sol::types<QByteArray>, lua_State *L, const QByteArray &value)
|
||||||
std::string_view(value.constData(), value.size()));
|
std::string_view(value.constData(), value.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace chatterino::lua {
|
||||||
|
|
||||||
// ThisPluginState
|
// ThisPluginState
|
||||||
|
|
||||||
bool sol_lua_check(sol::types<chatterino::lua::ThisPluginState>,
|
bool sol_lua_check(sol::types<chatterino::lua::ThisPluginState>,
|
||||||
|
@ -122,6 +124,8 @@ int sol_lua_push(sol::types<chatterino::lua::ThisPluginState>, lua_State *L,
|
||||||
return sol::stack::push(L, sol::thread(L, value));
|
return sol::stack::push(L, sol::thread(L, value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // namespace chatterino::lua
|
||||||
|
|
||||||
// NOLINTEND(readability-named-parameter)
|
// NOLINTEND(readability-named-parameter)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -148,8 +148,6 @@ inline nonstd::expected_lite::expected<T, QString> tryCall(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace chatterino::lua
|
|
||||||
|
|
||||||
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
|
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
|
||||||
# define SOL_STACK_FUNCTIONS(TYPE) \
|
# define SOL_STACK_FUNCTIONS(TYPE) \
|
||||||
bool sol_lua_check(sol::types<TYPE>, lua_State *L, int index, \
|
bool sol_lua_check(sol::types<TYPE>, lua_State *L, int index, \
|
||||||
|
@ -159,10 +157,13 @@ inline nonstd::expected_lite::expected<T, QString> tryCall(
|
||||||
sol::stack::record &tracking); \
|
sol::stack::record &tracking); \
|
||||||
int sol_lua_push(sol::types<TYPE>, lua_State *L, const TYPE &value);
|
int sol_lua_push(sol::types<TYPE>, lua_State *L, const TYPE &value);
|
||||||
|
|
||||||
|
SOL_STACK_FUNCTIONS(chatterino::lua::ThisPluginState)
|
||||||
|
|
||||||
|
} // namespace chatterino::lua
|
||||||
|
|
||||||
SOL_STACK_FUNCTIONS(QString)
|
SOL_STACK_FUNCTIONS(QString)
|
||||||
SOL_STACK_FUNCTIONS(QStringList)
|
SOL_STACK_FUNCTIONS(QStringList)
|
||||||
SOL_STACK_FUNCTIONS(QByteArray)
|
SOL_STACK_FUNCTIONS(QByteArray)
|
||||||
SOL_STACK_FUNCTIONS(chatterino::lua::ThisPluginState)
|
|
||||||
|
|
||||||
# undef SOL_STACK_FUNCTIONS
|
# undef SOL_STACK_FUNCTIONS
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue