[Python-checkins] python/dist/src/Mac/Modules/file _Filemodule.c,1.15,1.16 filesupport.py,1.14,1.15
jackjansen@users.sourceforge.net
jackjansen@users.sourceforge.net
Tue, 28 Jan 2003 15:29:48 -0800
Update of /cvsroot/python/python/dist/src/Mac/Modules/file
In directory sc8-pr-cvs1:/tmp/cvs-serv28498
Modified Files:
_Filemodule.c filesupport.py
Log Message:
Added a missing INCREF in pathname().
Index: _Filemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/file/_Filemodule.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** _Filemodule.c 26 Jan 2003 20:22:40 -0000 1.15
--- _Filemodule.c 28 Jan 2003 23:29:46 -0000 1.16
***************
*** 3027,3032 ****
if (!PyArg_ParseTuple(_args, "O", &obj))
return NULL;
! if (PyString_Check(obj))
return obj;
if (PyUnicode_Check(obj))
return PyUnicode_AsEncodedString(obj, "utf8", "strict");
--- 3027,3034 ----
if (!PyArg_ParseTuple(_args, "O", &obj))
return NULL;
! if (PyString_Check(obj)) {
! Py_INCREF(obj);
return obj;
+ }
if (PyUnicode_Check(obj))
return PyUnicode_AsEncodedString(obj, "utf8", "strict");
Index: filesupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/file/filesupport.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** filesupport.py 26 Jan 2003 20:22:41 -0000 1.14
--- filesupport.py 28 Jan 2003 23:29:46 -0000 1.15
***************
*** 875,880 ****
if (!PyArg_ParseTuple(_args, "O", &obj))
return NULL;
! if (PyString_Check(obj))
return obj;
if (PyUnicode_Check(obj))
return PyUnicode_AsEncodedString(obj, "utf8", "strict");
--- 875,882 ----
if (!PyArg_ParseTuple(_args, "O", &obj))
return NULL;
! if (PyString_Check(obj)) {
! Py_INCREF(obj);
return obj;
+ }
if (PyUnicode_Check(obj))
return PyUnicode_AsEncodedString(obj, "utf8", "strict");