Update of /cvsroot/pclasses/pclasses2/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16706
Modified Files:
CoreMutex.posix.cpp CoreMutex.win32.cpp
Log Message:
- Changed CoreMutex::_handle from "unsigned long" to "void*"
Index: CoreMutex.posix.cpp
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/src/CoreMutex.posix.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CoreMutex.posix.cpp 7 May 2005 11:53:43 -0000 1.2
+++ CoreMutex.posix.cpp 7 Jun 2005 22:45:45 -0000 1.3
@@ -26,7 +26,7 @@
namespace Traits {
CoreMutex::CoreMutex()
-: _handle((unsigned long)new pthread_mutex_t)
+: _handle((void*)new pthread_mutex_t)
{
pthread_mutexattr_t attrs;
pthread_mutexattr_init(&attrs);
Index: CoreMutex.win32.cpp
===================================================================
RCS file: /cvsroot/pclasses/pclasses2/src/CoreMutex.win32.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CoreMutex.win32.cpp 6 May 2005 15:21:01 -0000 1.1
+++ CoreMutex.win32.cpp 7 Jun 2005 22:45:45 -0000 1.2
@@ -23,28 +23,26 @@
namespace P {
-namespace Traits {
-
CoreMutex::CoreMutex()
-: _handle((unsigned long)new CRITICAL_SECTION)
+: _handle((void*)new CRITICAL_SECTION)
{
- InitializeCriticalSection((CRITICAL_SECTION*)_handle));
+ InitializeCriticalSection((CRITICAL_SECTION*)_handle);
}
CoreMutex::~CoreMutex()
{
- DeleteCriticalSection((CRITICAL_SECTION*)_handle));
+ DeleteCriticalSection((CRITICAL_SECTION*)_handle);
delete (CRITICAL_SECTION*)_handle;
}
void CoreMutex::lock() throw()
{
- EnterCriticalSection((CRITICAL_SECTION*)_handle));
+ EnterCriticalSection((CRITICAL_SECTION*)_handle);
}
void CoreMutex::unlock() throw()
{
- LeaveCriticalSection((CRITICAL_SECTION*)_handle));
+ LeaveCriticalSection((CRITICAL_SECTION*)_handle);
}
CoreMutex::ScopedLock::ScopedLock(CoreMutex& mtx)
@@ -58,6 +56,4 @@
_mtx.unlock();
}
-} // !namespace Traits
-
} // !namespace P
|