File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 * limitations under the License
1818 */
1919
20+ #include < string>
21+
2022#include " core/engine.h"
2123#include " editor/editor_settings.h"
2224
@@ -43,20 +45,11 @@ LuaScriptLanguage::~LuaScriptLanguage() {
4345 if (this ->singleton == this )
4446 this ->singleton = nullptr ;
4547
46- // In case the method finish() has not been called
47- if (this ->L ) {
48- lua_close (L);
49- this ->L = nullptr ;
50- }
5148} // TODO
5249
5350void LuaScriptLanguage::init () {
5451 print_debug (" LuaScriptLanguage::init" );
5552
56- this ->L = luaL_newstate ();
57- if (this ->L ) {
58- luaL_openlibs (this ->L );
59- }
6053} // TODO
6154
6255String LuaScriptLanguage::get_name () const {
@@ -86,10 +79,6 @@ Error LuaScriptLanguage::execute_file(const String &p_path) { // TODO
8679void LuaScriptLanguage::finish () {
8780 print_debug (" LuaScriptLanguage::finish" );
8881
89- if (this ->L ) {
90- lua_close (L);
91- this ->L = nullptr ;
92- }
9382} // TODO
9483
9584void LuaScriptLanguage::get_reserved_words (List<String> *p_words) const {
Original file line number Diff line number Diff line change 2020#pragma once
2121
2222#include " core/os/mutex.h"
23- #include " core/script_language.h"
2423
25- #include " debug.h"
26- #include " lua/lua.hpp"
2724#include " lua_script.h"
2825
2926class LuaScriptLanguage : public ScriptLanguage {
@@ -47,8 +44,6 @@ class LuaScriptLanguage : public ScriptLanguage {
4744 Mutex *mutex;
4845 SelfList<LuaScript>::List script_list;
4946
50- lua_State *L;
51-
5247public:
5348 LuaScriptLanguage ();
5449 virtual ~LuaScriptLanguage ();
You can’t perform that action at this time.
0 commit comments