aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/script')
-rw-r--r--src/script/cpp_api/s_base.cpp2
-rw-r--r--src/script/cpp_api/s_base.h2
-rw-r--r--src/script/cpp_api/s_internal.h2
3 files changed, 3 insertions, 3 deletions
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(); \