Skip to content

Commit

Permalink
fix memory dump : memories_callback 初始化
Browse files Browse the repository at this point in the history
Signed-off-by: shewer <[email protected]>
  • Loading branch information
shewer committed Oct 25, 2023
1 parent 5cf4a51 commit 73c109d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/script_translator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class LScriptTranslator : public ScriptTranslator {

protected:
Lua* lua_;
an<LuaObj> memorize_callback_ = {};
an<LuaObj> memorize_callback_;
string schema_id_;
};

Expand All @@ -71,6 +71,7 @@ bool LScriptTranslator::memorize(const CommitEntry& commit_entry) {

LScriptTranslator::LScriptTranslator(const Ticket& ticket, Lua* lua)
: lua_(lua), ScriptTranslator(ticket), schema_id_(ticket.schema->schema_id()){
memorize_callback_ = lua_->getglobal("___");
}

void LScriptTranslator::set_enable_correction(bool enable) {
Expand Down
2 changes: 2 additions & 0 deletions src/table_translator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ bool LTableTranslator::memorize(const CommitEntry& commit_entry) {

LTableTranslator::LTableTranslator(const Ticket& ticket, Lua* lua)
: lua_(lua), TableTranslator(ticket), schema_id_(ticket.schema->schema_id()){

memorize_callback_ = lua_->getglobal("___");
bool disable_userdict;
Config* config = ticket.schema->config();
config->GetBool(name_space_ + "/disable_userdict", &disable_userdict);
Expand Down
2 changes: 0 additions & 2 deletions src/types_ext.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#include <rime/filter.h>
#include <rime/dict/reverse_lookup_dictionary.h>
#include <rime/dict/user_db.h>
#include "table_translator.h"
#include "script_translator.h"

#include "lib/lua_export_type.h"
#include "lib/luatype_boost_optional.h"
Expand Down

0 comments on commit 73c109d

Please sign in to comment.