[pywin32-checkins] pywin32/win32/src PyUnicode.cpp,1.22,1.23
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2007-03-14 23:25:58
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11540/win32/src Modified Files: PyUnicode.cpp Log Message: In PyWinObject_FromMultipleString, return empty list instead of list containing an empty string if no strings present Index: PyUnicode.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyUnicode.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** PyUnicode.cpp 14 Mar 2007 04:29:35 -0000 1.22 --- PyUnicode.cpp 14 Mar 2007 23:25:58 -0000 1.23 *************** *** 1037,1041 **** { PyObject *obelement, *ret=NULL; ! int elementlen; if (multistring==NULL){ Py_INCREF(Py_None); --- 1037,1041 ---- { PyObject *obelement, *ret=NULL; ! size_t elementlen; if (multistring==NULL){ Py_INCREF(Py_None); *************** *** 1046,1050 **** return NULL; elementlen=wcslen(multistring); ! do{ obelement=PyWinObject_FromWCHAR(multistring, elementlen); if ((obelement==NULL)||(PyList_Append(ret,obelement)==-1)){ --- 1046,1050 ---- return NULL; elementlen=wcslen(multistring); ! while (elementlen){ obelement=PyWinObject_FromWCHAR(multistring, elementlen); if ((obelement==NULL)||(PyList_Append(ret,obelement)==-1)){ *************** *** 1057,1061 **** elementlen=wcslen(multistring); } - while (elementlen>0); return ret; } --- 1057,1060 ---- *************** *** 1064,1068 **** { PyObject *obelement, *ret=NULL; ! int elementlen; if (multistring==NULL){ Py_INCREF(Py_None); --- 1063,1067 ---- { PyObject *obelement, *ret=NULL; ! size_t elementlen; if (multistring==NULL){ Py_INCREF(Py_None); *************** *** 1073,1077 **** return NULL; elementlen=strlen(multistring); ! do{ obelement=PyString_FromStringAndSize(multistring, elementlen); if ((obelement==NULL)||(PyList_Append(ret,obelement)==-1)){ --- 1072,1076 ---- return NULL; elementlen=strlen(multistring); ! while (elementlen){ obelement=PyString_FromStringAndSize(multistring, elementlen); if ((obelement==NULL)||(PyList_Append(ret,obelement)==-1)){ *************** *** 1084,1088 **** elementlen=strlen(multistring); } - while (elementlen>0); return ret; } --- 1083,1086 ---- |