[pywin32-checkins] /hgroot/pywin32/pywin32: Fix ambiguous cast that could cause a P...
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <pyw...@li...> - 2012-11-19 19:14:13
|
changeset 8b73631eeee0 in /hgroot/pywin32/pywin32 details: http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/hgroot/pywin32/pywin32?cmd=changeset;node=8b73631eeee0 summary: Fix ambiguous cast that could cause a Python COM server to crash diffstat: com/win32com/src/include/PythonCOMServer.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 6c135ed37ebb -r 8b73631eeee0 com/win32com/src/include/PythonCOMServer.h --- a/com/win32com/src/include/PythonCOMServer.h Sat Nov 10 13:30:25 2012 -0500 +++ b/com/win32com/src/include/PythonCOMServer.h Mon Nov 19 14:13:18 2012 -0500 @@ -38,7 +38,7 @@ return *ppResult ? S_OK : E_OUTOFMEMORY; } \ protected: \ virtual IID GetIID(void) { return theIID; } \ - virtual void *ThisAsIID(IID iid) {if (this==NULL) return NULL;if (iid==theIID) return (IInterface *)this; else return gatewaybaseclass::ThisAsIID(iid);} \ + virtual void *ThisAsIID(IID iid) {if (this==NULL) return NULL;if (iid==theIID) return (IInterface *)(gatewaybaseclass *)this; else return gatewaybaseclass::ThisAsIID(iid);} \ STDMETHOD_(ULONG,AddRef)(void) {return gatewaybaseclass::AddRef();} \ STDMETHOD_(ULONG,Release)(void) {return gatewaybaseclass::Release();} \ STDMETHOD(QueryInterface)(REFIID iid, void ** obj) {return gatewaybaseclass::QueryInterface(iid, obj);}; |