Update of /cvsroot/pywin32/pywin32/com/win32comext/axdebug/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv981/src
Modified Files:
AXDebug.cpp PyIActiveScriptDebug.cpp stdafx.h
Log Message:
Avoid use of ATL (ie, remove conversion and assertion macros)
Index: stdafx.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axdebug/src/stdafx.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** stdafx.h 29 Jul 2005 05:30:32 -0000 1.3
--- stdafx.h 2 Mar 2009 06:10:40 -0000 1.4
***************
*** 9,15 ****
#include <modsupport.h>
- // Must come after Python headers.
- #include <atlbase.h>
-
#include "PythonCOM.h"
#include "PythonCOMServer.h"
--- 9,12 ----
Index: AXDebug.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axdebug/src/AXDebug.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** AXDebug.cpp 7 Feb 2009 04:28:59 -0000 1.8
--- AXDebug.cpp 2 Mar 2009 06:10:40 -0000 1.9
***************
*** 161,165 ****
static PyObject *GetThreadStateHandle(PyObject *self, PyObject *args)
{
! _ASSERTE(sizeof(void *) <= sizeof(long)); // can we hack ptrs into longs?
// We _must_ have the thread-lock to be called!
PyThreadState *myState = PyThreadState_Swap(NULL);
--- 161,165 ----
static PyObject *GetThreadStateHandle(PyObject *self, PyObject *args)
{
! assert(sizeof(void *) <= sizeof(long)); // can we hack ptrs into longs?
// We _must_ have the thread-lock to be called!
PyThreadState *myState = PyThreadState_Swap(NULL);
Index: PyIActiveScriptDebug.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axdebug/src/PyIActiveScriptDebug.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PyIActiveScriptDebug.cpp 7 Feb 2009 04:28:59 -0000 1.2
--- PyIActiveScriptDebug.cpp 2 Mar 2009 06:10:40 -0000 1.3
***************
*** 37,49 ****
// @pyparm string|pstrDelimiter||See <om PyIActiveScriptParse::ParseScriptText> for a description of this argument.
// @pyparm int|dwFlags||See <om PyIActiveScriptParse::ParseScriptText> for a description of this argument.
- USES_CONVERSION;
- char *szpstrDelimiter;
DWORD dwFlags;
PyObject *obCode;
! if ( !PyArg_ParseTuple(args, "Osi:GetScriptTextAttributes", &obCode, &szpstrDelimiter, &dwFlags) )
return NULL;
BOOL bPythonIsHappy = TRUE;
! const OLECHAR *pstrDelimiter = A2COLE(szpstrDelimiter);
BSTR bstr;
if (!PyCom_BstrFromPyObject(obCode, &bstr)) bPythonIsHappy = FALSE;
if (!bPythonIsHappy) return NULL;
--- 37,49 ----
// @pyparm string|pstrDelimiter||See <om PyIActiveScriptParse::ParseScriptText> for a description of this argument.
// @pyparm int|dwFlags||See <om PyIActiveScriptParse::ParseScriptText> for a description of this argument.
DWORD dwFlags;
PyObject *obCode;
! PyObject *obDelim;
! if ( !PyArg_ParseTuple(args, "OOi:GetScriptTextAttributes", &obCode, &obDelim, &dwFlags) )
return NULL;
BOOL bPythonIsHappy = TRUE;
! WCHAR *pstrDelimiter;
BSTR bstr;
+ if (!PyWinObject_AsWCHAR(obDelim, &pstrDelimiter)) bPythonIsHappy = FALSE;
if (!PyCom_BstrFromPyObject(obCode, &bstr)) bPythonIsHappy = FALSE;
if (!bPythonIsHappy) return NULL;
***************
*** 54,57 ****
--- 54,58 ----
PY_INTERFACE_POSTCALL;
SysFreeString(bstr);
+ PyWinObject_FreeWCHAR(pstrDelimiter);
if ( FAILED(hr) ) {
delete [] pattr;
***************
*** 71,83 ****
// @pyparm string|pstrDelimiter||See <om PyIActiveScriptParse::ParseScriptText> for a description of this argument.
// @pyparm int|dwFlags||See <om PyIActiveScriptParse::ParseScriptText> for a description of this argument.
- USES_CONVERSION;
- char *szpstrDelimiter;
DWORD dwFlags;
! PyObject *obCode;
! if ( !PyArg_ParseTuple(args, "Osi:GetScriptletTextAttributes", &obCode, &szpstrDelimiter, &dwFlags) )
return NULL;
BOOL bPythonIsHappy = TRUE;
! const OLECHAR *pstrDelimiter = A2COLE(szpstrDelimiter);
BSTR bstr;
if (!PyCom_BstrFromPyObject(obCode, &bstr)) bPythonIsHappy = FALSE;
if (!bPythonIsHappy) return NULL;
--- 72,83 ----
// @pyparm string|pstrDelimiter||See <om PyIActiveScriptParse::ParseScriptText> for a description of this argument.
// @pyparm int|dwFlags||See <om PyIActiveScriptParse::ParseScriptText> for a description of this argument.
DWORD dwFlags;
! PyObject *obCode, *obDelim;
! if ( !PyArg_ParseTuple(args, "OOi:GetScriptletTextAttributes", &obCode, &obDelim, &dwFlags) )
return NULL;
BOOL bPythonIsHappy = TRUE;
! WCHAR *pstrDelimiter;
BSTR bstr;
+ if (!PyWinObject_AsWCHAR(obDelim, &pstrDelimiter)) bPythonIsHappy = FALSE;
if (!PyCom_BstrFromPyObject(obCode, &bstr)) bPythonIsHappy = FALSE;
if (!bPythonIsHappy) return NULL;
***************
*** 88,91 ****
--- 88,92 ----
PY_INTERFACE_POSTCALL;
SysFreeString(bstr);
+ PyWinObject_FreeWCHAR(pstrDelimiter);
if ( FAILED(hr) )
return SetPythonCOMError(self,hr);
|