mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 22:11:51 +00:00
minor
This commit is contained in:
parent
f02edcf15a
commit
3f12d4389d
3 changed files with 3 additions and 3 deletions
|
|
@ -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 [](){};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue