summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorMiss Skeleton (bot) <31488909+miss-islington@users.noreply.github.com>2020-10-10 14:28:49 (GMT)
committerGitHub <noreply@github.com>2020-10-10 14:28:49 (GMT)
commitff6870f199511f09304e9d3ee7e7d8ed3902ffd1 (patch)
tree5e7b20126547db8088aa94b88b1410b7b9349d00 /Include
parentae485f5240daee76650935d78733fa558d1638f0 (diff)
downloadcpython-ff6870f199511f09304e9d3ee7e7d8ed3902ffd1.zip
cpython-ff6870f199511f09304e9d3ee7e7d8ed3902ffd1.tar.gz
cpython-ff6870f199511f09304e9d3ee7e7d8ed3902ffd1.tar.bz2
bpo-41986: Add Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode back to limited API (GH-22621)
(cherry picked from commit 637a09b0d6e3ad4e34e0b5e0fc82f5afeae6f74b) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Include')
-rw-r--r--Include/cpython/fileobject.h8
-rw-r--r--Include/fileobject.h7
2 files changed, 7 insertions, 8 deletions
diff --git a/Include/cpython/fileobject.h b/Include/cpython/fileobject.h
index 57eac13..3005ce1 100644
--- a/Include/cpython/fileobject.h
+++ b/Include/cpython/fileobject.h
@@ -8,14 +8,6 @@ extern "C" {
PyAPI_FUNC(char *) Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *);
-#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
-PyAPI_DATA(const char *) Py_FileSystemDefaultEncodeErrors;
-#endif
-
-#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000
-PyAPI_DATA(int) Py_UTF8Mode;
-#endif
-
/* The std printer acts as a preliminary sys.stderr until the new io
infrastructure is in place. */
PyAPI_FUNC(PyObject *) PyFile_NewStdPrinter(int);
diff --git a/Include/fileobject.h b/Include/fileobject.h
index 456887e..6ec2994 100644
--- a/Include/fileobject.h
+++ b/Include/fileobject.h
@@ -20,8 +20,15 @@ PyAPI_FUNC(int) PyObject_AsFileDescriptor(PyObject *);
If non-NULL, this is different than the default encoding for strings
*/
PyAPI_DATA(const char *) Py_FileSystemDefaultEncoding;
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
+PyAPI_DATA(const char *) Py_FileSystemDefaultEncodeErrors;
+#endif
PyAPI_DATA(int) Py_HasFileSystemDefaultEncoding;
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000
+PyAPI_DATA(int) Py_UTF8Mode;
+#endif
+
/* A routine to check if a file descriptor can be select()-ed. */
#ifdef _MSC_VER
/* On Windows, any socket fd can be select()-ed, no matter how high */