diff options
author | Steve Dower <steve.dower@microsoft.com> | 2015-03-02 16:01:10 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2015-03-02 16:01:10 (GMT) |
commit | 3e96f324dcdbeb78fcd8fa4ffe2cd0c67f3828b2 (patch) | |
tree | e717f66fa69341710e7a5f35300714c40011d595 /Objects | |
parent | 2f3d440549345857c7b1a6deb377b5b69052f639 (diff) | |
download | cpython-3e96f324dcdbeb78fcd8fa4ffe2cd0c67f3828b2.zip cpython-3e96f324dcdbeb78fcd8fa4ffe2cd0c67f3828b2.tar.gz cpython-3e96f324dcdbeb78fcd8fa4ffe2cd0c67f3828b2.tar.bz2 |
Issue #23451: Update pyconfig.h for Windows to require Vista headers and remove unnecessary version checks.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 8605c92..0dea83e 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -519,10 +519,6 @@ unicode_result_unchanged(PyObject *unicode) return _PyUnicode_Copy(unicode); } -#ifdef HAVE_MBCS -static OSVERSIONINFOEX winver; -#endif - /* --- Bloom Filters ----------------------------------------------------- */ /* stuff to implement simple "bloom filters" for Unicode characters. @@ -7112,13 +7108,7 @@ static DWORD encode_code_page_flags(UINT code_page, const char *errors) { if (code_page == CP_UTF8) { - if (winver.dwMajorVersion >= 6) - /* CP_UTF8 supports WC_ERR_INVALID_CHARS on Windows Vista - and later */ - return WC_ERR_INVALID_CHARS; - else - /* CP_UTF8 only supports flags=0 on Windows older than Vista */ - return 0; + return WC_ERR_INVALID_CHARS; } else if (code_page == CP_UTF7) { /* CP_UTF7 only supports flags=0 */ @@ -14976,13 +14966,6 @@ int _PyUnicode_Init(void) if (PyType_Ready(&PyFormatterIter_Type) < 0) Py_FatalError("Can't initialize formatter iter type"); -#ifdef HAVE_MBCS - winver.dwOSVersionInfoSize = sizeof(winver); - if (!GetVersionEx((OSVERSIONINFO*)&winver)) { - PyErr_SetFromWindowsErr(0); - return -1; - } -#endif return 0; } |