diff options
author | Michael W. Hudson <mwh@python.net> | 2004-11-30 14:31:54 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2004-11-30 14:31:54 (GMT) |
commit | 02d74f68c63ef93cd30873f7ff8c083dd3ec60c0 (patch) | |
tree | f8a0d3a69bed38ff0015918a9d4a0553eef2ae4c /Modules/fcntlmodule.c | |
parent | a3bc546d2a6d1d36bae274ec9cf3dc013c1c333a (diff) | |
download | cpython-02d74f68c63ef93cd30873f7ff8c083dd3ec60c0.zip cpython-02d74f68c63ef93cd30873f7ff8c083dd3ec60c0.tar.gz cpython-02d74f68c63ef93cd30873f7ff8c083dd3ec60c0.tar.bz2 |
Hear the #error: change the default value of the mutable_arg argument
to ioctl() and remove the warning when it is not supplied.
Diffstat (limited to 'Modules/fcntlmodule.c')
-rw-r--r-- | Modules/fcntlmodule.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c index 43f1773..54f3a2e 100644 --- a/Modules/fcntlmodule.c +++ b/Modules/fcntlmodule.c @@ -99,7 +99,7 @@ fcntl_ioctl(PyObject *self, PyObject *args) 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 @@ fcntl_ioctl(PyObject *self, PyObject *args) &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); |