Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15005
Modified Files:
PyIEnumExplorerCommand.cpp shell.cpp shell_pch.h
Log Message:
Fix build errors with VC6/Python 2.3
Index: shell_pch.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/shell_pch.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** shell_pch.h 7 Feb 2008 05:42:01 -0000 1.9
--- shell_pch.h 8 Feb 2008 22:32:29 -0000 1.10
***************
*** 67,71 ****
inline void PyObject_FreePCUIDLIST_RELATIVE(PCUIDLIST_RELATIVE pidl)
{
! return PyObject_FreePIDL((LPCITEMIDLIST)pidl);
}
--- 67,71 ----
inline void PyObject_FreePCUIDLIST_RELATIVE(PCUIDLIST_RELATIVE pidl)
{
! PyObject_FreePIDL((LPCITEMIDLIST)pidl);
}
***************
*** 76,80 ****
inline void PyObject_FreePCIDLIST_ABSOLUTE(PCIDLIST_ABSOLUTE pidl)
{
! return PyObject_FreePIDL((LPCITEMIDLIST)pidl);
}
--- 76,80 ----
inline void PyObject_FreePCIDLIST_ABSOLUTE(PCIDLIST_ABSOLUTE pidl)
{
! PyObject_FreePIDL((LPCITEMIDLIST)pidl);
}
Index: PyIEnumExplorerCommand.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIEnumExplorerCommand.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** PyIEnumExplorerCommand.cpp 7 Feb 2008 05:42:01 -0000 1.1
--- PyIEnumExplorerCommand.cpp 8 Feb 2008 22:32:29 -0000 1.2
***************
*** 180,183 ****
--- 180,184 ----
PY_GATEWAY_METHOD;
PyObject *result;
+ Py_ssize_t len;
HRESULT hr = InvokeViaPolicy("Next", &result, "i", celt);
if ( FAILED(hr) )
***************
*** 186,190 ****
if ( !PySequence_Check(result) )
goto error;
! Py_ssize_t len = PyObject_Length(result);
if ( len == -1 )
goto error;
--- 187,191 ----
if ( !PySequence_Check(result) )
goto error;
! len = PyObject_Length(result);
if ( len == -1 )
goto error;
Index: shell.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/shell.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -d -r1.61 -r1.62
*** shell.cpp 7 Feb 2008 05:42:01 -0000 1.61
--- shell.cpp 8 Feb 2008 22:32:29 -0000 1.62
***************
*** 2384,2390 ****
--- 2384,2392 ----
HRESULT hr;
void *v;
+ {
PY_INTERFACE_PRECALL;
hr = (*pfnAssocCreateForClasses)(elts, nclasses, iid, &v);
PY_INTERFACE_POSTCALL;
+ }
if (FAILED(hr)) {
PyCom_BuildPyException(hr);
***************
*** 2497,2500 ****
--- 2499,2503 ----
return NULL;
SFV_CREATE create;
+ IShellView *view = NULL;
memset(&create, 0, sizeof(create));
create.cbSize = sizeof(create);
***************
*** 2505,2513 ****
if (!PyCom_InterfaceFromPyInstanceOrObject(obevents, IID_IShellFolderViewCB, (void **)&create.psfvcb, TRUE/* bNoneOK */))
goto done;
- IShellView *view = NULL;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = (*pfnSHCreateShellFolderView)(&create, &view);
PY_INTERFACE_POSTCALL;
if (FAILED(hr))
PyCom_BuildPyException(hr);
--- 2508,2517 ----
if (!PyCom_InterfaceFromPyInstanceOrObject(obevents, IID_IShellFolderViewCB, (void **)&create.psfvcb, TRUE/* bNoneOK */))
goto done;
HRESULT hr;
+ {
PY_INTERFACE_PRECALL;
hr = (*pfnSHCreateShellFolderView)(&create, &view);
PY_INTERFACE_POSTCALL;
+ }
if (FAILED(hr))
PyCom_BuildPyException(hr);
***************
*** 2582,2588 ****
--- 2586,2594 ----
goto done;
HRESULT hr;
+ {
PY_INTERFACE_PRECALL;
hr = (*pfnSHCreateDataObject)(parent, nchildren, children, do_inner, iid, &do_ret);
PY_INTERFACE_POSTCALL;
+ }
if (FAILED(hr)) {
PyCom_BuildPyException(hr);
***************
*** 2626,2632 ****
--- 2632,2640 ----
goto done;
HRESULT hr;
+ {
PY_INTERFACE_PRECALL;
hr = (*pfnSHCreateDefaultContextMenu)(&dcm, iid, &iret);
PY_INTERFACE_POSTCALL;
+ }
if (FAILED(hr)) {
PyCom_BuildPyException(hr);
***************
*** 2659,2665 ****
--- 2667,2675 ----
goto done;
HRESULT hr;
+ {
PY_INTERFACE_PRECALL;
hr = (*pfnSHGetNameFromIDList)(pidl, flags, &strret);
PY_INTERFACE_POSTCALL;
+ }
if (FAILED(hr)) {
PyCom_BuildPyException(hr);
***************
*** 2705,2711 ****
--- 2715,2723 ----
goto done;
HRESULT hr;
+ {
PY_INTERFACE_PRECALL;
hr = (*pfnSHCreateShellItemArray)(parent, sf, nchildren, children, &sia_ret);
PY_INTERFACE_POSTCALL;
+ }
if (FAILED(hr)) {
PyCom_BuildPyException(hr);
***************
*** 2750,2756 ****
--- 2762,2770 ----
goto done;
HRESULT hr;
+ {
PY_INTERFACE_PRECALL;
hr = (*pfnSHCreateShellItemArrayFromDataObject)(ido, iid, &iret);
PY_INTERFACE_POSTCALL;
+ }
if (FAILED(hr)) {
PyCom_BuildPyException(hr);
***************
*** 2779,2782 ****
--- 2793,2797 ----
PyObject *obpidls;
PCIDLIST_ABSOLUTE_ARRAY pidls = NULL;
+ IShellItemArray *iret = NULL;
UINT npidls;
if(!PyArg_ParseTuple(args, "O:SHCreateShellItemArray", &obpidls))
***************
*** 2786,2793 ****
goto done;
HRESULT hr;
! IShellItemArray *iret = NULL;
PY_INTERFACE_PRECALL;
hr = (*pfnSHCreateShellItemArrayFromIDLists)(npidls, pidls, &iret);
PY_INTERFACE_POSTCALL;
if (FAILED(hr)) {
PyCom_BuildPyException(hr);
--- 2801,2810 ----
goto done;
HRESULT hr;
!
! {
PY_INTERFACE_PRECALL;
hr = (*pfnSHCreateShellItemArrayFromIDLists)(npidls, pidls, &iret);
PY_INTERFACE_POSTCALL;
+ }
if (FAILED(hr)) {
PyCom_BuildPyException(hr);
***************
*** 2825,2831 ****
--- 2842,2850 ----
goto done;
HRESULT hr;
+ {
PY_INTERFACE_PRECALL;
hr = (*pfnSHCreateShellItemArrayFromShellItem)(isi, iid, &iret);
PY_INTERFACE_POSTCALL;
+ }
if (FAILED(hr)) {
PyCom_BuildPyException(hr);
|