cpython/Modules/_io
Andy Lester e6be9b59a9
closes bpo-39605: Fix some casts to not cast away const. (GH-18453)
gcc -Wcast-qual turns up a number of instances of casting away constness of pointers. Some of these can be safely modified, by either:

Adding the const to the type cast, as in:

-    return _PyUnicode_FromUCS1((unsigned char*)s, size);
+    return _PyUnicode_FromUCS1((const unsigned char*)s, size);

or, Removing the cast entirely, because it's not necessary (but probably was at one time), as in:

-    PyDTrace_FUNCTION_ENTRY((char *)filename, (char *)funcname, lineno);
+    PyDTrace_FUNCTION_ENTRY(filename, funcname, lineno);

These changes will not change code, but they will make it much easier to check for errors in consts
2020-02-11 18:28:35 -08:00
..
clinic bpo-37330: open() no longer accept 'U' in file mode (GH-16959) 2019-10-28 15:40:08 +01:00
_iomodule.c bpo-39573: Use Py_TYPE() macro in Modules directory (GH-18393) 2020-02-07 03:37:06 +01:00
_iomodule.h bpo-11410: Standardize and use symbol visibility attributes across POSIX and Windows. (GH-16347) 2019-10-15 08:26:12 +01:00
bufferedio.c bpo-39245: Switch to public API for Vectorcall (GH-18460) 2020-02-11 17:46:57 +01:00
bytesio.c bpo-11410: Standardize and use symbol visibility attributes across POSIX and Windows. (GH-16347) 2019-10-15 08:26:12 +01:00
fileio.c closes bpo-27805: Ignore ESPIPE in initializing seek of append-mode files. (GH-17112) 2019-11-12 14:51:34 -08:00
iobase.c bpo-39245: Switch to public API for Vectorcall (GH-18460) 2020-02-11 17:46:57 +01:00
stringio.c bpo-39245: Switch to public API for Vectorcall (GH-18460) 2020-02-11 17:46:57 +01:00
textio.c closes bpo-39605: Fix some casts to not cast away const. (GH-18453) 2020-02-11 18:28:35 -08:00
winconsoleio.c bpo-37547: Fix a compiler warning in winconsoleio.c (GH-14785) 2019-07-19 15:07:06 +09:00