From b863a84471a5c79fbfa7a342155bedc1011de15c Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 29 Mar 2016 07:54:41 +0200 Subject: [PATCH] Build fix for Win64 refs #11462 --- lib/base/objectlock.hpp | 4 ++-- lib/base/string-script.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/base/objectlock.hpp b/lib/base/objectlock.hpp index 2ef73ecf6..ea2e05484 100644 --- a/lib/base/objectlock.hpp +++ b/lib/base/objectlock.hpp @@ -62,7 +62,7 @@ public: #ifdef _WIN32 # ifdef _WIN64 - while (InterlockedCompareExchange64(&object->m_Mutex, I2MUTEX_LOCKED, I2MUTEX_UNLOCKED) != I2MUTEX_UNLOCKED) { + while (InterlockedCompareExchange64((LONGLONG *)&object->m_Mutex, I2MUTEX_LOCKED, I2MUTEX_UNLOCKED) != I2MUTEX_UNLOCKED) { # else /* _WIN64 */ while (InterlockedCompareExchange(&object->m_Mutex, I2MUTEX_LOCKED, I2MUTEX_UNLOCKED) != I2MUTEX_UNLOCKED) { # endif /* _WIN64 */ @@ -84,7 +84,7 @@ public: mtx->lock(); #ifdef _WIN32 # ifdef _WIN64 - InterlockedCompareExchange64(&object->m_Mutex, reinterpret_cast(mtx), I2MUTEX_LOCKED); + InterlockedCompareExchange64((LONGLONG *)&object->m_Mutex, reinterpret_cast(mtx), I2MUTEX_LOCKED); # else /* _WIN64 */ InterlockedCompareExchange(&object->m_Mutex, reinterpret_cast(mtx), I2MUTEX_LOCKED); # endif /* _WIN64 */ diff --git a/lib/base/string-script.cpp b/lib/base/string-script.cpp index 83aef1b19..7ea1c91ab 100644 --- a/lib/base/string-script.cpp +++ b/lib/base/string-script.cpp @@ -86,7 +86,7 @@ static Array::Ptr StringSplit(const String& delims) return result; } -static Value StringFind(const std::vector& args) +static int StringFind(const std::vector& args) { ScriptFrame *vframe = ScriptFrame::GetCurrentFrame(); String self = vframe->Self;