minor
This commit is contained in:
@@ -372,7 +372,7 @@ const std::string lua::LuaState::storeAnonymous() {
|
|||||||
return funcName;
|
return funcName;
|
||||||
}
|
}
|
||||||
|
|
||||||
runnable lua::LuaState::createLambda() {
|
runnable lua::LuaState::createRunnable() {
|
||||||
auto ptr = reinterpret_cast<ptrdiff_t>(lua_topointer(L, -1));
|
auto ptr = reinterpret_cast<ptrdiff_t>(lua_topointer(L, -1));
|
||||||
auto name = util::mangleid(ptr);
|
auto name = util::mangleid(ptr);
|
||||||
lua_getglobal(L, LAMBDAS_TABLE.c_str());
|
lua_getglobal(L, LAMBDAS_TABLE.c_str());
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ namespace lua {
|
|||||||
bool hasglobal(const std::string& name);
|
bool hasglobal(const std::string& name);
|
||||||
bool rename(const std::string& from, const std::string& to);
|
bool rename(const std::string& from, const std::string& to);
|
||||||
void remove(const std::string& name);;
|
void remove(const std::string& name);;
|
||||||
runnable createLambda();
|
runnable createRunnable();
|
||||||
int createEnvironment(int parent);
|
int createEnvironment(int parent);
|
||||||
void removeEnvironment(int id);
|
void removeEnvironment(int id);
|
||||||
const std::string storeAnonymous();
|
const std::string storeAnonymous();
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ runnable scripting::create_runnable(
|
|||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
state->loadbuffer(*env, src, file);
|
state->loadbuffer(*env, src, file);
|
||||||
return state->createLambda();
|
return state->createRunnable();
|
||||||
} catch (const lua::luaerror& err) {
|
} catch (const lua::luaerror& err) {
|
||||||
logger.error() << err.what();
|
logger.error() << err.what();
|
||||||
return [](){};
|
return [](){};
|
||||||
|
|||||||
Reference in New Issue
Block a user