From: <jda...@us...> - 2010-12-23 14:33:21
|
Revision: 521 http://pyscard.svn.sourceforge.net/pyscard/?rev=521&view=rev Author: jdaussel Date: 2010-12-23 14:33:15 +0000 (Thu, 23 Dec 2010) Log Message: ----------- Fixed cast warnings Modified Paths: -------------- trunk/pyscard/src/smartcard/scard/helpers.c Modified: trunk/pyscard/src/smartcard/scard/helpers.c =================================================================== --- trunk/pyscard/src/smartcard/scard/helpers.c 2010-12-23 14:31:01 UTC (rev 520) +++ trunk/pyscard/src/smartcard/scard/helpers.c 2010-12-23 14:33:15 UTC (rev 521) @@ -187,7 +187,7 @@ build a Python byte list from a BYTELIST ==============================================================================*/ { - int cBytes, x; + Py_ssize_t cBytes, x; BYTELIST* pbl; @@ -232,7 +232,7 @@ pbl->ab=NULL; } pbl->bAllocated=TRUE; - pbl->cBytes=cBytes; + pbl->cBytes=(SCARDDWORDARG)cBytes; for( x=0; x<cBytes; x++ ) @@ -375,7 +375,7 @@ build a Python byte list from a GUIDLIST ==============================================================================*/ { - int cBytes, cGuids, x; + Py_ssize_t cBytes, cGuids, x; //int iGuid, iByte; GUIDLIST* pgl; unsigned char* p; @@ -421,7 +421,7 @@ return NULL; } pgl->bAllocated=TRUE; - pgl->cGuids=cGuids; + pgl->cGuids=(unsigned long)cGuids; pgl->hcontext=(unsigned long)NULL; // allocate GUIDs in GUID list @@ -579,7 +579,7 @@ return NULL; } - cRStates = PyList_Size(source); + cRStates = (SCARDDWORDARG)PyList_Size(source); for( x=0; x<cRStates; x++) { PyObject* o = PyList_GetItem( source, x ); @@ -983,7 +983,7 @@ will have to be freed externally to the wrapper ==============================================================================*/ { - unsigned long ulLength; + size_t ulLength; STRING* pstr=NULL; for(;;) @@ -1128,7 +1128,7 @@ build a Python string list from a STRINGLIST ==============================================================================*/ { - int cStrings, cChars, x; + Py_ssize_t cStrings, cChars, x; STRINGLIST* psl; char* p; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |