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

mwh at users.sourceforge.net mwh at users.sourceforge.net
Tue Nov 30 15:31:56 CET 2004


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

Modified Files:
	fcntlmodule.c 
Log Message:
Hear the #error: change the default value of the mutable_arg argument
to ioctl() and remove the warning when it is not supplied.


Index: fcntlmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/fcntlmodule.c,v
retrieving revision 2.42
retrieving revision 2.43
diff -u -d -r2.42 -r2.43
--- fcntlmodule.c	3 Jun 2004 12:47:26 -0000	2.42
+++ fcntlmodule.c	30 Nov 2004 14:31:54 -0000	2.43
@@ -99,7 +99,7 @@
 	int ret;
 	char *str;
 	int len;
-	int mutate_arg = 0;
+	int mutate_arg = 1;
 	char buf[1024];
 
 	if (PyArg_ParseTuple(args, "O&iw#|i:ioctl",
@@ -107,16 +107,6 @@
 			     &str, &len, &mutate_arg)) {
 		char *arg;
 
-		if (PyTuple_Size(args) == 3) {
-#if (PY_MAJOR_VERSION>2) || (PY_MINOR_VERSION>=5)
-#error Remove the warning, change mutate_arg to 1
-#endif
-			if (PyErr_Warn(PyExc_FutureWarning,
-       "ioctl with mutable buffer will mutate the buffer by default in 2.5"
-				    ) < 0)
-				return NULL;
-			mutate_arg = 0;
-		}
 	       	if (mutate_arg) {
 			if (len <= sizeof buf) {
 				memcpy(buf, str, len);



More information about the Python-checkins mailing list