Update of /cvsroot/pywin32/pywin32/com/win32comext/authorization/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28710/com/win32comext/authorization/src
Modified Files:
PyGSecurityInformation.cpp
Log Message:
Fix a couple of 64-bit warnings
Index: PyGSecurityInformation.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/authorization/src/PyGSecurityInformation.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** PyGSecurityInformation.cpp 3 Jun 2007 14:53:06 -0000 1.4
--- PyGSecurityInformation.cpp 13 Aug 2007 04:28:51 -0000 1.5
***************
*** 176,180 ****
HRESULT hr;
PyObject *result=NULL, *obObjectType=NULL;
! PyObject *obAccesses, *fsAccesses=NULL, *obAccess, *tpAccess;
PyObject *si_access_guid, *si_access_Name;
ULONG tuple_ind;
--- 176,180 ----
HRESULT hr;
PyObject *result=NULL, *obObjectType=NULL;
! PyObject *obAccesses, *Accesses_tuple=NULL, *obAccess, *tpAccess;
PyObject *si_access_guid, *si_access_Name;
ULONG tuple_ind;
***************
*** 203,213 ****
goto done;
}
! fsAccesses=PySequence_Fast(obAccesses,"Return value must be a sequence of SI_ACCESS tuples");
! if (fsAccesses==NULL){
hr=MAKE_PYCOM_GATEWAY_FAILURE_CODE("GetAccessRights");
goto done;
}
- cAccessRights=PySequence_Fast_GET_SIZE(fsAccesses);
// piDefaultAccess is apparently not sanity checked, and can cause a crash in aclui.dll if
// greater than actual number of SI_ACCESS's.
--- 203,212 ----
goto done;
}
! Accesses_tuple=PyWinSequence_Tuple(obAccesses, &cAccessRights);
! if (Accesses_tuple==NULL){
hr=MAKE_PYCOM_GATEWAY_FAILURE_CODE("GetAccessRights");
goto done;
}
// piDefaultAccess is apparently not sanity checked, and can cause a crash in aclui.dll if
// greater than actual number of SI_ACCESS's.
***************
*** 224,228 ****
hr=S_OK;
for (tuple_ind=0;tuple_ind<cAccessRights; tuple_ind++){
! obAccess=PySequence_Fast_GET_ITEM(fsAccesses, tuple_ind);
tpAccess=PySequence_Tuple(obAccess);
if ((tpAccess==NULL)
--- 223,227 ----
hr=S_OK;
for (tuple_ind=0;tuple_ind<cAccessRights; tuple_ind++){
! obAccess=PyTuple_GET_ITEM(Accesses_tuple, tuple_ind);
tpAccess=PySequence_Tuple(obAccess);
if ((tpAccess==NULL)
***************
*** 253,257 ****
Py_XDECREF(result);
Py_XDECREF(obObjectType);
! Py_XDECREF(fsAccesses);
return hr;
}
--- 252,256 ----
Py_XDECREF(result);
Py_XDECREF(obObjectType);
! Py_XDECREF(Accesses_tuple);
return hr;
}
***************
*** 311,315 ****
{
PY_GATEWAY_METHOD;
! PyObject *result=NULL, *fsInheritTypes=NULL, *obInheritType, *tpInheritType=NULL;
PyObject *obguid, *obName;
ULONG tuple_ind;
--- 310,314 ----
{
PY_GATEWAY_METHOD;
! PyObject *result=NULL, *InheritTypes_tuple=NULL, *obInheritType, *tpInheritType=NULL;
PyObject *obguid, *obName;
ULONG tuple_ind;
***************
*** 320,329 ****
if (FAILED(hr))
goto done;
! fsInheritTypes=PySequence_Fast(result,"Return value must be a sequence of SI_INHERIT_TYPE tuples");
! if (fsInheritTypes==NULL){
hr=MAKE_PYCOM_GATEWAY_FAILURE_CODE("GetInheritTypes");
goto done;
}
- cInheritTypes=PySequence_Fast_GET_SIZE(fsInheritTypes);
InheritTypes=(PSI_INHERIT_TYPE)malloc(cInheritTypes * sizeof(SI_INHERIT_TYPE));
if (InheritTypes==NULL){
--- 319,327 ----
if (FAILED(hr))
goto done;
! InheritTypes_tuple=PyWinSequence_Tuple(result, &cInheritTypes);
! if (InheritTypes_tuple==NULL){
hr=MAKE_PYCOM_GATEWAY_FAILURE_CODE("GetInheritTypes");
goto done;
}
InheritTypes=(PSI_INHERIT_TYPE)malloc(cInheritTypes * sizeof(SI_INHERIT_TYPE));
if (InheritTypes==NULL){
***************
*** 334,338 ****
hr=S_OK;
for (tuple_ind=0;tuple_ind<cInheritTypes; tuple_ind++){
! obInheritType=PySequence_Fast_GET_ITEM(fsInheritTypes, tuple_ind);
tpInheritType=PySequence_Tuple(obInheritType);
if ((tpInheritType==NULL)
--- 332,336 ----
hr=S_OK;
for (tuple_ind=0;tuple_ind<cInheritTypes; tuple_ind++){
! obInheritType=PyTuple_GET_ITEM(InheritTypes_tuple, tuple_ind);
tpInheritType=PySequence_Tuple(obInheritType);
if ((tpInheritType==NULL)
***************
*** 359,363 ****
*ppInheritTypes=InheritTypes;
*pcInheritTypes=cInheritTypes;
! Py_XDECREF(fsInheritTypes);
Py_XDECREF(result);
return hr;
--- 357,361 ----
*ppInheritTypes=InheritTypes;
*pcInheritTypes=cInheritTypes;
! Py_XDECREF(InheritTypes_tuple);
Py_XDECREF(result);
return hr;
|