]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-34403: Always implement _Py_GetForceASCII() (GH-10235)
authorVictor Stinner <vstinner@redhat.com>
Tue, 30 Oct 2018 13:32:01 +0000 (14:32 +0100)
committerGitHub <noreply@github.com>
Tue, 30 Oct 2018 13:32:01 +0000 (14:32 +0100)
Compilation fails on macOS because _Py_GetForceASCII() wasn't define:
always implement implement (default implementation: just return 0).

Python/fileutils.c

index 1b7e6697c74aba565f216f79d044c3b61b3933b5..b3b7925073b21965b93e5607f031c51d61901f84 100644 (file)
@@ -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) */