[Python-checkins] python/dist/src/Modules _csv.c,1.21,1.22

andrewmcnamara at users.sourceforge.net andrewmcnamara at users.sourceforge.net
Mon Jan 10 13:25:14 CET 2005


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6651/Modules

Modified Files:
	_csv.c 
Log Message:
When parsing args that return a single character, treat null string the
same as None.


Index: _csv.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_csv.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- _csv.c	10 Jan 2005 12:22:48 -0000	1.21
+++ _csv.c	10 Jan 2005 12:25:11 -0000	1.22
@@ -207,7 +207,7 @@
 	if (src == NULL)
 		*target = dflt;
 	else {
-		if (src == Py_None)
+		if (src == Py_None || PyString_Size(src) == 0)
 			*target = '\0';
 		else if (!PyString_Check(src) || PyString_Size(src) != 1) {
 			PyErr_Format(PyExc_TypeError, 



More information about the Python-checkins mailing list