comparison Python/sysmodule.c @ 49536:cbc3afc1e40a

Apply Martin's patch for bug 3685, Crash while compiling Python 3000 in OpenBSD 4.4.
author Barry Warsaw <barry@python.org>
date Fri, 17 Oct 2008 01:15:29 +0000
parents e822992cf6ce
children 2c3a6c9dff62
comparison
equal deleted inserted replaced
49535:491ed80a8cc1 49536:cbc3afc1e40a
1385 if (v == NULL) 1385 if (v == NULL)
1386 return NULL; 1386 return NULL;
1387 for (i = 0; ; i++) { 1387 for (i = 0; ; i++) {
1388 p = wcschr(path, delim); 1388 p = wcschr(path, delim);
1389 if (p == NULL) 1389 if (p == NULL)
1390 p = wcschr(path, L'\0'); /* End of string */ 1390 p = path + wcslen(path); /* End of string */
1391 w = PyUnicode_FromWideChar(path, (Py_ssize_t)(p - path)); 1391 w = PyUnicode_FromWideChar(path, (Py_ssize_t)(p - path));
1392 if (w == NULL) { 1392 if (w == NULL) {
1393 Py_DECREF(v); 1393 Py_DECREF(v);
1394 return NULL; 1394 return NULL;
1395 } 1395 }