Update of /cvsroot/pywin32/pywin32/com/win32com/src/extensions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23340/com/win32com/src/extensions
Modified Files:
PyFUNCDESC.cpp PySTGMEDIUM.cpp PyTYPEATTR.cpp PyVARDESC.cpp
Log Message:
Another pass at getting things working on x64. This change incorporates
most of Sidnei's work on the AMD64 branch, and updates most of the other
win32 and win32com modules that haven't already had 64bit love from Roger
(thanks guys!). Note this is not complete - among the outstanding issues
are fixing 's#' format strings (but most of the tests *do* pass on x64,
and the ones which don't fail for 'vista environment' reasons rather
than x64 reasons)
Index: PyTYPEATTR.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyTYPEATTR.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PyTYPEATTR.cpp 28 Mar 2007 12:30:33 -0000 1.2
--- PyTYPEATTR.cpp 24 May 2007 06:01:04 -0000 1.3
***************
*** 178,182 ****
// Sequence stuff to provide compatibility with tuples.
! /* static */ int PyTYPEATTR::getlength(PyObject *self)
{
// NEVER CHANGE THIS - you will break all the old
--- 178,182 ----
// Sequence stuff to provide compatibility with tuples.
! /* static */ Py_ssize_t PyTYPEATTR::getlength(PyObject *self)
{
// NEVER CHANGE THIS - you will break all the old
***************
*** 185,189 ****
}
! /* static */ PyObject *PyTYPEATTR::getitem(PyObject *self, int index)
{
PyTYPEATTR *p = (PyTYPEATTR *)self;
--- 185,189 ----
}
! /* static */ PyObject *PyTYPEATTR::getitem(PyObject *self, Py_ssize_t index)
{
PyTYPEATTR *p = (PyTYPEATTR *)self;
Index: PySTGMEDIUM.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PySTGMEDIUM.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** PySTGMEDIUM.cpp 20 May 2005 23:25:49 -0000 1.6
--- PySTGMEDIUM.cpp 24 May 2007 06:01:04 -0000 1.7
***************
*** 48,52 ****
case TYMED_HGLOBAL: {
const void * buf = NULL;
! int cb = 0;
if (PyObject_AsReadBuffer(ob,&buf,&cb)==-1)
return PyErr_Format(PyExc_TypeError, "tymed value of %d requires a string/unicode/buffer", tymed);
--- 48,52 ----
case TYMED_HGLOBAL: {
const void * buf = NULL;
! Py_ssize_t cb = 0;
if (PyObject_AsReadBuffer(ob,&buf,&cb)==-1)
return PyErr_Format(PyExc_TypeError, "tymed value of %d requires a string/unicode/buffer", tymed);
***************
*** 157,161 ****
break;
case TYMED_HGLOBAL: {
! UINT cb = GlobalSize(medium.hGlobal);
pDest->hGlobal = GlobalAlloc(GMEM_FIXED, cb);
if (!pDest->hGlobal) {
--- 157,161 ----
break;
case TYMED_HGLOBAL: {
! SIZE_T cb = GlobalSize(medium.hGlobal);
pDest->hGlobal = GlobalAlloc(GMEM_FIXED, cb);
if (!pDest->hGlobal) {
***************
*** 168,172 ****
case TYMED_FILE:
if (medium.lpszFileName) {
! int cch = wcslen(medium.lpszFileName) + 1;
if (!(pDest->lpszFileName = (WCHAR *)CoTaskMemAlloc(sizeof(WCHAR) * cch))) {
PyErr_NoMemory();
--- 168,172 ----
case TYMED_FILE:
if (medium.lpszFileName) {
! size_t cch = wcslen(medium.lpszFileName) + 1;
if (!(pDest->lpszFileName = (WCHAR *)CoTaskMemAlloc(sizeof(WCHAR) * cch))) {
PyErr_NoMemory();
Index: PyVARDESC.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyVARDESC.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PyVARDESC.cpp 7 Feb 2007 23:12:31 -0000 1.2
--- PyVARDESC.cpp 24 May 2007 06:01:04 -0000 1.3
***************
*** 197,201 ****
// Sequence stuff to provide compatibility with tuples.
! /* static */ int PyVARDESC::getlength(PyObject *self)
{
// NEVER CHANGE THIS - you will break all the old
--- 197,201 ----
// Sequence stuff to provide compatibility with tuples.
! /* static */ Py_ssize_t PyVARDESC::getlength(PyObject *self)
{
// NEVER CHANGE THIS - you will break all the old
***************
*** 204,208 ****
}
! /* static */ PyObject *PyVARDESC::getitem(PyObject *self, int index)
{
PyVARDESC *p = (PyVARDESC *)self;
--- 204,208 ----
}
! /* static */ PyObject *PyVARDESC::getitem(PyObject *self, Py_ssize_t index)
{
PyVARDESC *p = (PyVARDESC *)self;
Index: PyFUNCDESC.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyFUNCDESC.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** PyFUNCDESC.cpp 1 Sep 1999 23:03:32 -0000 1.1
--- PyFUNCDESC.cpp 24 May 2007 06:01:04 -0000 1.2
***************
*** 73,77 ****
fd->cScodes = (short)PySequence_Length(pyfd->scodeArray);
fd->lprgscode = (SCODE *)AllocMore(fd, sizeof(SCODE)*fd->cScodes);
! for (int i=0;i<fd->cScodes;i++) {
PyObject *sub=PySequence_GetItem(ob, i);
if (sub==NULL) goto done;
--- 73,77 ----
fd->cScodes = (short)PySequence_Length(pyfd->scodeArray);
fd->lprgscode = (SCODE *)AllocMore(fd, sizeof(SCODE)*fd->cScodes);
! for (Py_ssize_t i=0;i<fd->cScodes;i++) {
PyObject *sub=PySequence_GetItem(ob, i);
if (sub==NULL) goto done;
***************
*** 220,224 ****
// Sequence stuff to provide compatibility with tuples.
! /* static */ int PyFUNCDESC::getlength(PyObject *self)
{
// NEVER CHANGE THIS - you will break all the old
--- 220,224 ----
// Sequence stuff to provide compatibility with tuples.
! /* static */ Py_ssize_t PyFUNCDESC::getlength(PyObject *self)
{
// NEVER CHANGE THIS - you will break all the old
***************
*** 227,231 ****
}
! /* static */ PyObject *PyFUNCDESC::getitem(PyObject *self, int index)
{
PyFUNCDESC *p = (PyFUNCDESC *)self;
--- 227,231 ----
}
! /* static */ PyObject *PyFUNCDESC::getitem(PyObject *self, Py_ssize_t index)
{
PyFUNCDESC *p = (PyFUNCDESC *)self;
|