From e50c784e2ca55735fc360ae51534288c2ea59ca5 Mon Sep 17 00:00:00 2001 From: est31 Date: Sat, 23 Jan 2016 05:45:00 +0100 Subject: Fix C++11 compilability Previous commits broke it... :( --- src/script/cpp_api/s_base.cpp | 2 +- src/script/cpp_api/s_base.h | 2 +- src/script/cpp_api/s_internal.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/script/cpp_api') diff --git a/src/script/cpp_api/s_base.cpp b/src/script/cpp_api/s_base.cpp index 71369e3d7..679a517ee 100644 --- a/src/script/cpp_api/s_base.cpp +++ b/src/script/cpp_api/s_base.cpp @@ -68,7 +68,7 @@ public: */ ScriptApiBase::ScriptApiBase() : - m_luastackmutex(true) + m_luastackmutex() { #ifdef SCRIPTAPI_LOCK_DEBUG m_lock_recursion_count = 0; diff --git a/src/script/cpp_api/s_base.h b/src/script/cpp_api/s_base.h index d30373ce1..ead385a43 100644 --- a/src/script/cpp_api/s_base.h +++ b/src/script/cpp_api/s_base.h @@ -108,7 +108,7 @@ protected: void objectrefGetOrCreate(lua_State *L, ServerActiveObject *cobj); void objectrefGet(lua_State *L, u16 id); - Mutex m_luastackmutex; + RecursiveMutex m_luastackmutex; std::string m_last_run_mod; bool m_secure; #ifdef SCRIPTAPI_LOCK_DEBUG diff --git a/src/script/cpp_api/s_internal.h b/src/script/cpp_api/s_internal.h index 651fed95f..37473c497 100644 --- a/src/script/cpp_api/s_internal.h +++ b/src/script/cpp_api/s_internal.h @@ -75,7 +75,7 @@ private: #endif #define SCRIPTAPI_PRECHECKHEADER \ - MutexAutoLock scriptlock(this->m_luastackmutex); \ + RecursiveMutexAutoLock scriptlock(this->m_luastackmutex); \ SCRIPTAPI_LOCK_CHECK; \ realityCheck(); \ lua_State *L = getStack(); \ -- cgit v1.2.3