summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2017-09-08 21:30:07 (GMT)
committerGitHub <noreply@github.com>2017-09-08 21:30:07 (GMT)
commitdb610e909b07ced88e73fb0c23e04eed0d4e1b0d (patch)
tree3a544a13d75e43755e2c490211e1cea91050ca37
parent4c81401b3a9ffa48fc9e1ffff9963cbad5111e33 (diff)
downloadcpython-db610e909b07ced88e73fb0c23e04eed0d4e1b0d.zip
cpython-db610e909b07ced88e73fb0c23e04eed0d4e1b0d.tar.gz
cpython-db610e909b07ced88e73fb0c23e04eed0d4e1b0d.tar.bz2
delete dead locale initialization code for windows (#3461)
-rw-r--r--Python/pylifecycle.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index b9f916b..caa324e 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -264,11 +264,7 @@ error:
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");