summaryrefslogtreecommitdiffstats
path: root/PC/getpathp.c
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2015-02-26 04:48:01 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2015-02-26 04:48:01 (GMT)
commitf63dab5a842df7349af73be23fb3acc37aa75703 (patch)
tree1bb0e65096caacc588b21ea5c2539a5147f2a5a4 /PC/getpathp.c
parentb3f51e3c449585a1396f17df9d5db224ba3e0e0a (diff)
downloadcpython-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 'PC/getpathp.c')
-rw-r--r--PC/getpathp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/PC/getpathp.c b/PC/getpathp.c
index deb40e7..d4f4574 100644
--- a/PC/getpathp.c
+++ b/PC/getpathp.c
@@ -451,11 +451,12 @@ find_env_config_value(FILE * env_file, const wchar_t * key, wchar_t * value)
tmpbuffer, MAXPATHLEN * 2);
Py_DECREF(decoded);
if (k >= 0) {
- wchar_t * tok = wcstok(tmpbuffer, L" \t\r\n");
+ wchar_t * context = NULL;
+ wchar_t * tok = wcstok_s(tmpbuffer, L" \t\r\n", &context);
if ((tok != NULL) && !wcscmp(tok, key)) {
- tok = wcstok(NULL, L" \t");
+ tok = wcstok_s(NULL, L" \t", &context);
if ((tok != NULL) && !wcscmp(tok, L"=")) {
- tok = wcstok(NULL, L"\r\n");
+ tok = wcstok_s(NULL, L"\r\n", &context);
if (tok != NULL) {
wcsncpy(value, tok, MAXPATHLEN);
result = 1;