From 02a13a4ec494101ce9219650fbdc63dbf885aa69 Mon Sep 17 00:00:00 2001 From: Harald Radi Date: Mon, 20 May 2002 15:38:19 +0000 Subject: this way it even compiles #blame me if i did something wrong, i didn't test it ;) --- sapi/activescript/classfactory.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sapi/activescript/classfactory.cpp') diff --git a/sapi/activescript/classfactory.cpp b/sapi/activescript/classfactory.cpp index 3d4f256db6..7dd37424c7 100644 --- a/sapi/activescript/classfactory.cpp +++ b/sapi/activescript/classfactory.cpp @@ -41,32 +41,32 @@ volatile LONG TPHPClassFactory::object_count = 0; TPHPClassFactory::TPHPClassFactory() { m_refcount = 1; - InterlockedIncrement(&factory_count); + InterlockedIncrement(const_cast (&factory_count)); } TPHPClassFactory::~TPHPClassFactory() { - InterlockedDecrement(&factory_count); + InterlockedDecrement(const_cast (&factory_count)); } void TPHPClassFactory::AddToObjectCount(void) { - InterlockedIncrement(&object_count); + InterlockedIncrement(const_cast (&object_count)); } void TPHPClassFactory::RemoveFromObjectCount(void) { - InterlockedDecrement(&object_count); + InterlockedDecrement(const_cast (&object_count)); } STDMETHODIMP_(DWORD) TPHPClassFactory::AddRef(void) { - return InterlockedIncrement(&m_refcount); + return InterlockedIncrement(const_cast (&m_refcount)); } STDMETHODIMP_(DWORD) TPHPClassFactory::Release(void) { - DWORD ret = InterlockedDecrement(&m_refcount); + DWORD ret = InterlockedDecrement(const_cast (&m_refcount)); if (ret == 0) delete this; return ret; -- cgit v1.2.1