适配接口

This commit is contained in:
xx
2024-06-07 19:58:57 +08:00
parent 31b2247a44
commit 58842c796a
2 changed files with 2 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ void module::local_storage::regist(sol::state* lua)
);
}
void module::local_storage::regist_global(const std::string& name, sol::state* lua)
void module::local_storage::regist_global(const char* name, sol::state* lua)
{
lua->registry()[name] = this;
(*lua)[name] = this;

View File

@@ -20,7 +20,7 @@ namespace module
static void regist(sol::state* lua);
private:
// 通过 imodule 继承
virtual void regist_global(const std::string& name, sol::state* lua);
virtual void regist_global(const char* name, sol::state* lua);
virtual void delete_global() { delete this; }
};
}