Page MenuHomePhabricator (Chris)

No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
diff --git a/src/ScriptExecutor.cpp b/src/ScriptExecutor.cpp
index 40e7584..7a53f19 100644
--- a/src/ScriptExecutor.cpp
+++ b/src/ScriptExecutor.cpp
@@ -1,40 +1,40 @@
/*
* Copyright (C) 2012 Me and My Shadow
*
* This file is part of Me and My Shadow.
*
* Me and My Shadow is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Me and My Shadow is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Me and My Shadow. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ScriptExecutor.h"
ScriptExecutor::ScriptExecutor(){
//Initialize the state.
- state=lua_open();
+ state=luaL_newstate();
//Load the lua libraries.
luaL_openlibs(state);
}
ScriptExecutor::~ScriptExecutor(){
lua_close(state);
}
void ScriptExecutor::registerFunction(std::string name,lua_CFunction function){
lua_register(state,name.c_str(),function);
}
void ScriptExecutor::executeScript(Script script){
luaL_dostring(state,script.script);
}

File Metadata

Mime Type
text/x-diff
Expires
Fri, May 15, 4:54 PM (3 h, 28 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
63943
Default Alt Text
(1 KB)

Event Timeline