[icinga-checkins] icinga.org: icinga2/fix/test: wip

git at icinga.org git at icinga.org
Thu Feb 4 23:33:57 CET 2016


Module: icinga2
Branch: fix/test
Commit: e8388e2ff52141a9eecbc93baf76e88a68dac11c
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=e8388e2ff52141a9eecbc93baf76e88a68dac11c

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Thu Feb  4 23:15:48 2016 +0100

wip

---

 lib/base/object.hpp |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/base/object.hpp b/lib/base/object.hpp
index 26a4a31..8f7a7f4 100644
--- a/lib/base/object.hpp
+++ b/lib/base/object.hpp
@@ -117,7 +117,11 @@ private:
 	Object(const Object& other);
 	Object& operator=(const Object& rhs);
 
+#	ifndef _WIN32
 	intptr_t m_References;
+#	else /* _WIN32 */
+	uintptr_t m_References;
+#	endif /* _WIN32 */
 	mutable uintptr_t m_Mutex;
 
 #ifdef I2_DEBUG
@@ -153,11 +157,10 @@ inline void intrusive_ptr_add_ref(Object *object)
 
 inline void intrusive_ptr_release(Object *object)
 {
-	intptr_t refs;
 #ifdef _WIN32
-	refs = InterlockedDecrement(&object->m_References);
+	uintptr_t refs = InterlockedDecrement(&object->m_References);
 #else /* _WIN32 */
-	refs = __sync_sub_and_fetch(&object->m_References, 1);
+	intptr_t refs = __sync_sub_and_fetch(&object->m_References, 1);
 #endif /* _WIN32 */
 
 	ASSERT(refs >= 0);



More information about the icinga-checkins mailing list