comparison Python/sysmodule.c @ 87115:780a0199c7f1 3.3

sysmodule.c: fix sys_update_path(), use Py_ARRAY_LENGTH() to get the size of the fullpath buffer, not PATH_MAX. fullpath is declared using MAXPATHLEN or MAX_PATH depending on the OS, and PATH_MAX is not declared on IRIX.
author Victor Stinner <victor.stinner@gmail.com>
date Fri, 15 Nov 2013 17:33:43 +0100
parents 694e50a79638
children f39fac22ca9a
comparison
equal deleted inserted replaced
87113:159e51e5fc2c 87115:780a0199c7f1
1893 } 1893 }
1894 } 1894 }
1895 #else /* All other filename syntaxes */ 1895 #else /* All other filename syntaxes */
1896 if (_HAVE_SCRIPT_ARGUMENT(argc, argv)) { 1896 if (_HAVE_SCRIPT_ARGUMENT(argc, argv)) {
1897 #if defined(HAVE_REALPATH) 1897 #if defined(HAVE_REALPATH)
1898 if (_Py_wrealpath(argv0, fullpath, PATH_MAX)) { 1898 if (_Py_wrealpath(argv0, fullpath, Py_ARRAY_LENGTH(fullpath))) {
1899 argv0 = fullpath; 1899 argv0 = fullpath;
1900 } 1900 }
1901 #endif 1901 #endif
1902 p = wcsrchr(argv0, SEP); 1902 p = wcsrchr(argv0, SEP);
1903 } 1903 }