comparison Python/sysmodule.c @ 87116:f39fac22ca9a

(Merge 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:35:31 +0100
parents 01c4a0af73cf 780a0199c7f1
children adb471b9cba1
comparison
equal deleted inserted replaced
87114:58ffd70d02b6 87116:f39fac22ca9a
1957 } 1957 }
1958 } 1958 }
1959 #else /* All other filename syntaxes */ 1959 #else /* All other filename syntaxes */
1960 if (_HAVE_SCRIPT_ARGUMENT(argc, argv)) { 1960 if (_HAVE_SCRIPT_ARGUMENT(argc, argv)) {
1961 #if defined(HAVE_REALPATH) 1961 #if defined(HAVE_REALPATH)
1962 if (_Py_wrealpath(argv0, fullpath, PATH_MAX)) { 1962 if (_Py_wrealpath(argv0, fullpath, Py_ARRAY_LENGTH(fullpath))) {
1963 argv0 = fullpath; 1963 argv0 = fullpath;
1964 } 1964 }
1965 #endif 1965 #endif
1966 p = wcsrchr(argv0, SEP); 1966 p = wcsrchr(argv0, SEP);
1967 } 1967 }