summaryrefslogtreecommitdiff
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-08-29 01:29:06 +0200
committerGitHub <noreply@github.com>2018-08-29 01:29:06 +0200
commit124b9eb4e41ba1676dad954eec9a1fb3480794e4 (patch)
tree896bb0524d76ed32915e24b2320b0a8b0628ba57 /Include
parent2c8ddcf4f14f3e4c87a6fe6678ab5ad09130c6ab (diff)
downloadcpython-git-124b9eb4e41ba1676dad954eec9a1fb3480794e4.tar.gz
bpo-34485: Add _Py_ClearStandardStreamEncoding() (GH-8982)
* Move Py_SetStandardStreamEncoding() from pylifecycle.c to coreconfig.c * Add _Py_ClearStandardStreamEncoding() private function. * pymain_free() now calls _Py_ClearStandardStreamEncoding(). * Add assertions add the end of _PyCoreConfig_Read() * _PyCoreConfig_Copy(): rename COPY_STR_ATTR() macro to COPY_WSTR_ATTR(). * Fix get_stdio_errors() indentation.
Diffstat (limited to 'Include')
-rw-r--r--Include/pylifecycle.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/pylifecycle.h b/Include/pylifecycle.h
index 4965d7cbf0..2029827702 100644
--- a/Include/pylifecycle.h
+++ b/Include/pylifecycle.h
@@ -19,7 +19,13 @@ PyAPI_FUNC(wchar_t *) Py_GetPythonHome(void);
*/
PyAPI_FUNC(int) Py_SetStandardStreamEncoding(const char *encoding,
const char *errors);
+#endif
+#ifdef Py_BUILD_CORE
+PyAPI_FUNC(void) _Py_ClearStandardStreamEncoding(void);
+#endif
+
+#ifndef Py_LIMITED_API
/* PEP 432 Multi-phase initialization API (Private while provisional!) */
PyAPI_FUNC(_PyInitError) _Py_InitializeCore(
PyInterpreterState **interp,