diff options
author | Harald Radi <phanto@php.net> | 2002-05-20 15:38:19 +0000 |
---|---|---|
committer | Harald Radi <phanto@php.net> | 2002-05-20 15:38:19 +0000 |
commit | 02a13a4ec494101ce9219650fbdc63dbf885aa69 (patch) | |
tree | 8785e53ded7ea62f3df64541e5225376a8330c6f /sapi/activescript/scriptengine.cpp | |
parent | e47a667cc91333627bc07aab42f0a7025181e85e (diff) | |
download | php-git-02a13a4ec494101ce9219650fbdc63dbf885aa69.tar.gz |
this way it even compiles
#blame me if i did something wrong, i didn't test it ;)
Diffstat (limited to 'sapi/activescript/scriptengine.cpp')
-rw-r--r-- | sapi/activescript/scriptengine.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sapi/activescript/scriptengine.cpp b/sapi/activescript/scriptengine.cpp index b0dc40dcb5..8e1f92baaf 100644 --- a/sapi/activescript/scriptengine.cpp +++ b/sapi/activescript/scriptengine.cpp @@ -250,11 +250,11 @@ public: } STDMETHODIMP_(DWORD) AddRef(void) { - return InterlockedIncrement(&m_refcount); + return InterlockedIncrement(const_cast<long*> (&m_refcount)); } STDMETHODIMP_(DWORD) Release(void) { - DWORD ret = InterlockedDecrement(&m_refcount); + DWORD ret = InterlockedDecrement(const_cast<long*> (&m_refcount)); trace("%08x: IDispatchImpl: release ref count is now %d\n", this, ret); if (ret == 0) delete this; @@ -1286,12 +1286,12 @@ trace("Add %s to global namespace\n", name); STDMETHODIMP_(DWORD) TPHPScriptingEngine::AddRef(void) { - return InterlockedIncrement(&m_refcount); + return InterlockedIncrement(const_cast<long*> (&m_refcount)); } STDMETHODIMP_(DWORD) TPHPScriptingEngine::Release(void) { - DWORD ret = InterlockedDecrement(&m_refcount); + DWORD ret = InterlockedDecrement(const_cast<long*> (&m_refcount)); if (ret == 0) { trace("%08x: Release: zero refcount, destroy the engine!\n", this); delete this; @@ -1305,9 +1305,9 @@ STDMETHODIMP TPHPScriptingEngine::QueryInterface(REFIID iid, void **ppvObject) if (IsEqualGUID(IID_IActiveScript, iid)) { *ppvObject = (IActiveScript*)this; - } else if (IsEqualGUID(IID_IActiveScriptParse32, iid)) { - *ppvObject = (IActiveScriptParse32*)this; - } else if (IsEqualGUID(IID_IActiveScriptParseProcedure32, iid)) { + } else if (IsEqualGUID(IID_IActiveScriptParse, iid)) { + *ppvObject = (IActiveScriptParse*)this; + } else if (IsEqualGUID(IID_IActiveScriptParseProcedure, iid)) { *ppvObject = (IActiveScriptParseProcedure*)this; } else if (IsEqualGUID(IID_IUnknown, iid)) { *ppvObject = this; @@ -1717,11 +1717,11 @@ public: } STDMETHODIMP_(DWORD) AddRef(void) { - return InterlockedIncrement(&m_refcount); + return InterlockedIncrement(const_cast<long*> (&m_refcount)); } STDMETHODIMP_(DWORD) Release(void) { - DWORD ret = InterlockedDecrement(&m_refcount); + DWORD ret = InterlockedDecrement(const_cast<long*> (&m_refcount)); trace("Release: errobj refcount=%d\n", ret); if (ret == 0) delete this; |