[Python-checkins] delete dead locale initialization code for windows (#3461)
Benjamin Peterson
webhook-mailer at python.org
Fri Sep 8 17:30:10 EDT 2017
https://github.com/python/cpython/commit/db610e909b07ced88e73fb0c23e04eed0d4e1b0d
commit: db610e909b07ced88e73fb0c23e04eed0d4e1b0d
branch: master
author: Benjamin Peterson <benjamin at python.org>
committer: GitHub <noreply at github.com>
date: 2017年09月08日T14:30:07-07:00
summary:
delete dead locale initialization code for windows (#3461)
files:
M Python/pylifecycle.c
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index b9f916bf39f..caa324e3afa 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -264,11 +264,7 @@ get_codec_name(const char *encoding)
static char*
get_locale_encoding(void)
{
-#ifdef MS_WINDOWS
- char codepage[100];
- PyOS_snprintf(codepage, sizeof(codepage), "cp%d", GetACP());
- return get_codec_name(codepage);
-#elif defined(HAVE_LANGINFO_H) && defined(CODESET)
+#if defined(HAVE_LANGINFO_H) && defined(CODESET)
char* codeset = nl_langinfo(CODESET);
if (!codeset || codeset[0] == '0円') {
PyErr_SetString(PyExc_ValueError, "CODESET is not set or empty");
More information about the Python-checkins
mailing list