[Python-checkins] bpo-34403: Always implement _Py_GetForceASCII() (GH-10235)

Victor Stinner webhook-mailer at python.org
Tue Oct 30 09:32:13 EDT 2018


https://github.com/python/cpython/commit/7d35f79012db89ce9a152a77ac6809eb9c34a35d
commit: 7d35f79012db89ce9a152a77ac6809eb9c34a35d
branch: 3.7
author: Victor Stinner <vstinner at redhat.com>
committer: GitHub <noreply at github.com>
date: 2018-10-30T14:32:01+01:00
summary:

bpo-34403: Always implement _Py_GetForceASCII() (GH-10235)

Compilation fails on macOS because _Py_GetForceASCII() wasn't define:
always implement implement (default implementation: just return 0).

files:
M Python/fileutils.c

diff --git a/Python/fileutils.c b/Python/fileutils.c
index 1b7e6697c74a..b3b7925073b2 100644
--- a/Python/fileutils.c
+++ b/Python/fileutils.c
@@ -246,6 +246,12 @@ encode_ascii(const wchar_t *text, char **str,
     *str = result;
     return 0;
 }
+#else
+int
+_Py_GetForceASCII(void)
+{
+    return 0;
+}
 #endif   /* !defined(__APPLE__) && !defined(__ANDROID__) && !defined(MS_WINDOWS) */
 
 



More information about the Python-checkins mailing list