test fix: declare sol_lua_* of ThisPluginState inside chatterino::lua ns

This commit is contained in:
Rasmus Karlsson 2024-10-14 20:07:49 +02:00
parent 57a5e23a69
commit 374cef51cc
No known key found for this signature in database
2 changed files with 8 additions and 3 deletions

View file

@ -98,6 +98,8 @@ int sol_lua_push(sol::types<QByteArray>, lua_State *L, const QByteArray &value)
std::string_view(value.constData(), value.size()));
}
namespace 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));
}
} // namespace chatterino::lua
// NOLINTEND(readability-named-parameter)
#endif

View file

@ -148,8 +148,6 @@ inline nonstd::expected_lite::expected<T, QString> tryCall(
}
}
} // namespace chatterino::lua
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
# define SOL_STACK_FUNCTIONS(TYPE) \
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); \
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(QStringList)
SOL_STACK_FUNCTIONS(QByteArray)
SOL_STACK_FUNCTIONS(chatterino::lua::ThisPluginState)
# undef SOL_STACK_FUNCTIONS