Skip to content

Commit 7d35f79

Browse files
authored
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).
1 parent 21220bb commit 7d35f79

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Python/fileutils.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,12 @@ encode_ascii(const wchar_t *text, char **str,
246246
*str = result;
247247
return 0;
248248
}
249+
#else
250+
int
251+
_Py_GetForceASCII(void)
252+
{
253+
return 0;
254+
}
249255
#endif /* !defined(__APPLE__) && !defined(__ANDROID__) && !defined(MS_WINDOWS) */
250256

251257

0 commit comments

Comments
 (0)