[Python-checkins] python/dist/src/Modules fcntlmodule.c,2.43,2.44

mwh@users.sourceforge.net mwh at users.sourceforge.net
Wed Jul 27 22:24:42 CEST 2005


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

Modified Files:
	fcntlmodule.c 
Log Message:
This is barry-scott's patch:

[ 1231069 ] ioctl has problem with -ive request codes

by using the 'I' not the 'i' format code to PyArg_ParseTuple().

Backport candidate?  Maybe...


Index: fcntlmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/fcntlmodule.c,v
retrieving revision 2.43
retrieving revision 2.44
diff -u -d -r2.43 -r2.44
--- fcntlmodule.c	30 Nov 2004 14:31:54 -0000	2.43
+++ fcntlmodule.c	27 Jul 2005 20:24:30 -0000	2.44
@@ -102,7 +102,7 @@
 	int mutate_arg = 1;
 	char buf[1024];
 
-	if (PyArg_ParseTuple(args, "O&iw#|i:ioctl",
+	if (PyArg_ParseTuple(args, "O&Iw#|i:ioctl",
                              conv_descriptor, &fd, &code, 
 			     &str, &len, &mutate_arg)) {
 		char *arg;
@@ -151,7 +151,7 @@
 	}
 
 	PyErr_Clear();
-	if (PyArg_ParseTuple(args, "O&is#:ioctl",
+	if (PyArg_ParseTuple(args, "O&Is#:ioctl",
                              conv_descriptor, &fd, &code, &str, &len)) {
 		if (len > sizeof buf) {
 			PyErr_SetString(PyExc_ValueError,
@@ -172,7 +172,7 @@
 	PyErr_Clear();
 	arg = 0;
 	if (!PyArg_ParseTuple(args,
-	     "O&i|i;ioctl requires a file or file descriptor,"
+	     "O&I|i;ioctl requires a file or file descriptor,"
 	     " an integer and optionally a integer or buffer argument",
 			      conv_descriptor, &fd, &code, &arg)) {
 	  return NULL;



More information about the Python-checkins mailing list