[Python-checkins] python/dist/src/Modules bz2module.c,1.22,1.23

doerwalter at users.sourceforge.net doerwalter at users.sourceforge.net
Mon Nov 1 18:10:22 CET 2004


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

Modified Files:
	bz2module.c 
Log Message:
Add error checks for the bz2, cStringIO and operator modules.

Add function names to various PyArg_ParseTuple calls in bz2module.c.


Index: bz2module.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/bz2module.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- bz2module.c	14 Feb 2004 00:02:45 -0000	1.22
+++ bz2module.c	1 Nov 2004 17:10:19 -0000	1.23
@@ -787,7 +787,7 @@
 	int len;
 	int bzerror;
 
-	if (!PyArg_ParseTuple(args, "s#", &buf, &len))
+	if (!PyArg_ParseTuple(args, "s#:write", &buf, &len))
 		return NULL;
 
 	ACQUIRE_LOCK(self);
@@ -1500,7 +1500,7 @@
 	bz_stream *bzs = &self->bzs;
 	int bzerror;
 
-	if (!PyArg_ParseTuple(args, "s#", &data, &datasize))
+	if (!PyArg_ParseTuple(args, "s#:compress", &data, &datasize))
 		return NULL;
 
 	if (datasize == 0)
@@ -1781,7 +1781,7 @@
 	bz_stream *bzs = &self->bzs;
 	int bzerror;
 
-	if (!PyArg_ParseTuple(args, "s#", &data, &datasize))
+	if (!PyArg_ParseTuple(args, "s#:decompress", &data, &datasize))
 		return NULL;
 
 	ACQUIRE_LOCK(self);
@@ -2069,7 +2069,7 @@
 	bz_stream *bzs = &_bzs;
 	int bzerror;
 
-	if (!PyArg_ParseTuple(args, "s#", &data, &datasize))
+	if (!PyArg_ParseTuple(args, "s#:decompress", &data, &datasize))
 		return NULL;
 
 	if (datasize == 0)



More information about the Python-checkins mailing list