diff options
author | Steve Dower <steve.dower@microsoft.com> | 2015-02-26 04:48:01 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2015-02-26 04:48:01 (GMT) |
commit | f63dab5a842df7349af73be23fb3acc37aa75703 (patch) | |
tree | 1bb0e65096caacc588b21ea5c2539a5147f2a5a4 /Modules/main.c | |
parent | b3f51e3c449585a1396f17df9d5db224ba3e0e0a (diff) | |
download | cpython-f63dab5a842df7349af73be23fb3acc37aa75703.zip cpython-f63dab5a842df7349af73be23fb3acc37aa75703.tar.gz cpython-f63dab5a842df7349af73be23fb3acc37aa75703.tar.bz2 |
Back-out wcstok deprecation suppression and updates calls to use wcstok_s.
Diffstat (limited to 'Modules/main.c')
-rw-r--r-- | Modules/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/main.c b/Modules/main.c index 83538c4..74e512b 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -520,16 +520,16 @@ Py_Main(int argc, wchar_t **argv) #ifdef MS_WINDOWS if (!Py_IgnoreEnvironmentFlag && (wp = _wgetenv(L"PYTHONWARNINGS")) && *wp != L'\0') { - wchar_t *buf, *warning; + wchar_t *buf, *warning, *context = NULL; buf = (wchar_t *)PyMem_RawMalloc((wcslen(wp) + 1) * sizeof(wchar_t)); if (buf == NULL) Py_FatalError( "not enough memory to copy PYTHONWARNINGS"); wcscpy(buf, wp); - for (warning = wcstok(buf, L","); + for (warning = wcstok_s(buf, L",", &context); warning != NULL; - warning = wcstok(NULL, L",")) { + warning = wcstok_s(NULL, L",", &context)) { PySys_AddWarnOption(warning); } PyMem_RawFree(buf); |