This commit is contained in:
MihailRis 2024-05-05 00:51:45 +03:00
parent f02edcf15a
commit 3f12d4389d
3 changed files with 3 additions and 3 deletions

View File

@ -372,7 +372,7 @@ const std::string lua::LuaState::storeAnonymous() {
return funcName;
}
runnable lua::LuaState::createLambda() {
runnable lua::LuaState::createRunnable() {
auto ptr = reinterpret_cast<ptrdiff_t>(lua_topointer(L, -1));
auto name = util::mangleid(ptr);
lua_getglobal(L, LAMBDAS_TABLE.c_str());

View File

@ -63,7 +63,7 @@ namespace lua {
bool hasglobal(const std::string& name);
bool rename(const std::string& from, const std::string& to);
void remove(const std::string& name);;
runnable createLambda();
runnable createRunnable();
int createEnvironment(int parent);
void removeEnvironment(int id);
const std::string storeAnonymous();

View File

@ -21,7 +21,7 @@ runnable scripting::create_runnable(
) {
try {
state->loadbuffer(*env, src, file);
return state->createLambda();
return state->createRunnable();
} catch (const lua::luaerror& err) {
logger.error() << err.what();
return [](){};