Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/addonloader/luastate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@

namespace fcitx {
LuaState::LuaState(Library *library)
: luaLibrary_(library), state_(nullptr, _fcitx_lua_close) {
:
#ifdef USE_DLOPEN
luaLibrary_(library),
#endif
state_(nullptr, _fcitx_lua_close) {
#ifndef USE_DLOPEN
FCITX_UNUSED(library);
#endif
// Resolve all required lua function first.
#define FOREACH_LUA_FUNCTION(NAME) \
FILL_LUA_API(NAME); \
Expand Down
3 changes: 3 additions & 0 deletions src/addonloader/luastate.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#ifndef _FCITX5_LUA_ADDONLOADER_LUASTATE_H_
#define _FCITX5_LUA_ADDONLOADER_LUASTATE_H_

#include "config.h"
#include "luastate_details.h"
#include <fcitx-utils/library.h>
#include <functional>
Expand All @@ -29,7 +30,9 @@ struct LuaState {
}

private:
#ifdef USE_DLOPEN
Library *luaLibrary_;
#endif

#define FOREACH_LUA_FUNCTION DECLARE_LUA_FUNCTION_PTR
#include "luafunc.h"
Expand Down
Loading