Update of /cvsroot/pywin32/pywin32/win32/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27135/win32/src
Modified Files:
win32consolemodule.cpp win32credmodule.cpp
Log Message:
Fix more 64-bit warnings
Index: win32consolemodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32consolemodule.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** win32consolemodule.cpp 3 Jun 2007 14:53:07 -0000 1.11
--- win32consolemodule.cpp 12 Aug 2007 08:31:41 -0000 1.12
***************
*** 62,68 ****
return FALSE;
}
! if ((ushorts_tuple=PySequence_Tuple(obushorts))==NULL)
return FALSE; // last exit without cleaning up
- *item_cnt=PyTuple_Size(ushorts_tuple);
bufsize=*item_cnt * sizeof(USHORT);
*pushorts=(USHORT *)malloc(bufsize);
--- 62,67 ----
return FALSE;
}
! if ((ushorts_tuple=PyWinSequence_Tuple(obushorts, item_cnt))==NULL)
return FALSE; // last exit without cleaning up
bufsize=*item_cnt * sizeof(USHORT);
*pushorts=(USHORT *)malloc(bufsize);
***************
*** 1407,1414 ****
&obbuf)) // @pyparm (<o PyINPUT_RECORD>,...)|Buffer||A sequence of <o PyINPUT_RECORD> objects
return NULL;
! obtuple=PySequence_Tuple(obbuf);
if (obtuple==NULL)
return NULL;
- nbrofrecords=PyTuple_GET_SIZE(obtuple);
pinput_records=(INPUT_RECORD *)malloc(nbrofrecords *sizeof(INPUT_RECORD));
if (pinput_records==NULL){
--- 1406,1412 ----
&obbuf)) // @pyparm (<o PyINPUT_RECORD>,...)|Buffer||A sequence of <o PyINPUT_RECORD> objects
return NULL;
! obtuple=PyWinSequence_Tuple(obbuf, &nbrofrecords);
if (obtuple==NULL)
return NULL;
pinput_records=(INPUT_RECORD *)malloc(nbrofrecords *sizeof(INPUT_RECORD));
if (pinput_records==NULL){
Index: win32credmodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32credmodule.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** win32credmodule.cpp 3 Jun 2007 14:53:07 -0000 1.7
--- win32credmodule.cpp 12 Aug 2007 08:31:41 -0000 1.8
***************
*** 45,50 ****
static char *keywords[]={"Keyword","Flags","Value", NULL};
PyObject *obKeyword, *obValue, *args;
! const void *value;
! Py_ssize_t valuelen;
BOOL ret;
ZeroMemory(attr, sizeof(CREDENTIAL_ATTRIBUTE));
--- 45,50 ----
static char *keywords[]={"Keyword","Flags","Value", NULL};
PyObject *obKeyword, *obValue, *args;
! void *value;
! DWORD valuelen;
BOOL ret;
ZeroMemory(attr, sizeof(CREDENTIAL_ATTRIBUTE));
***************
*** 60,64 ****
&obKeyword, &attr->Flags, &obValue)
&&PyWinObject_AsWCHAR(obKeyword, &attr->Keyword, FALSE)
! &&(PyObject_AsReadBuffer(obValue, &value, &valuelen)==0)
&&((attr->Value=(LPBYTE)malloc(valuelen))!=NULL);
if (ret){
--- 60,64 ----
&obKeyword, &attr->Flags, &obValue)
&&PyWinObject_AsWCHAR(obKeyword, &attr->Keyword, FALSE)
! &&PyWinObject_AsReadBuffer(obValue, &value, &valuelen)
&&((attr->Value=(LPBYTE)malloc(valuelen))!=NULL);
if (ret){
***************
*** 92,99 ****
if (obattrs==Py_None)
return TRUE;
! attr_tuple=PySequence_Tuple(obattrs);
if (attr_tuple==NULL)
return FALSE;
- *attr_cnt=PyTuple_GET_SIZE(attr_tuple);
if (*attr_cnt>0){
*attrs=(PCREDENTIAL_ATTRIBUTE)malloc(*attr_cnt * sizeof(CREDENTIAL_ATTRIBUTE));
--- 92,98 ----
if (obattrs==Py_None)
return TRUE;
! attr_tuple=PyWinSequence_Tuple(obattrs, attr_cnt);
if (attr_tuple==NULL)
return FALSE;
if (*attr_cnt>0){
*attrs=(PCREDENTIAL_ATTRIBUTE)malloc(*attr_cnt * sizeof(CREDENTIAL_ATTRIBUTE));
|