Lines Matching refs:calculate
669 get_pth_filename(PyCalculatePath *calculate, wchar_t *filename, in get_pth_filename() argument
689 calculate_pth_file(PyCalculatePath *calculate, _PyPathConfig *pathconfig, in calculate_pth_file() argument
694 if (!get_pth_filename(calculate, filename, pathconfig)) { in calculate_pth_file()
707 calculate_pyvenv_file(PyCalculatePath *calculate, in calculate_pyvenv_file() argument
750 calculate_home_prefix(PyCalculatePath *calculate, in calculate_home_prefix() argument
755 if (calculate->home == NULL || *calculate->home == '\0') { in calculate_home_prefix()
759 calculate->home = prefix; in calculate_home_prefix()
762 calculate->home = prefix; in calculate_home_prefix()
765 calculate->home = NULL; in calculate_home_prefix()
769 wcscpy_s(prefix, MAXPATHLEN+1, calculate->home); in calculate_home_prefix()
775 calculate_module_search_path(PyCalculatePath *calculate, in calculate_module_search_path() argument
781 int skiphome = calculate->home==NULL ? 0 : 1; in calculate_module_search_path()
784 calculate->machine_path = getpythonregpath(HKEY_LOCAL_MACHINE, in calculate_module_search_path()
786 calculate->user_path = getpythonregpath(HKEY_CURRENT_USER, skiphome); in calculate_module_search_path()
791 int skipdefault = (calculate->pythonpath_env != NULL || in calculate_module_search_path()
792 calculate->home != NULL || in calculate_module_search_path()
793 calculate->machine_path != NULL || in calculate_module_search_path()
794 calculate->user_path != NULL); in calculate_module_search_path()
811 if (calculate->home != NULL) { in calculate_module_search_path()
819 bufsz *= wcslen(calculate->home); in calculate_module_search_path()
823 if (calculate->user_path) { in calculate_module_search_path()
824 bufsz += wcslen(calculate->user_path) + 1; in calculate_module_search_path()
826 if (calculate->machine_path) { in calculate_module_search_path()
827 bufsz += wcslen(calculate->machine_path) + 1; in calculate_module_search_path()
830 if (calculate->pythonpath_env != NULL) { in calculate_module_search_path()
831 bufsz += wcslen(calculate->pythonpath_env) + 1; in calculate_module_search_path()
841 if (calculate->pythonpath_env) { in calculate_module_search_path()
843 calculate->pythonpath_env)) { in calculate_module_search_path()
856 if (calculate->user_path) { in calculate_module_search_path()
857 if (wcscpy_s(buf, bufsz - (buf - start_buf), calculate->user_path)) { in calculate_module_search_path()
863 if (calculate->machine_path) { in calculate_module_search_path()
864 if (wcscpy_s(buf, bufsz - (buf - start_buf), calculate->machine_path)) { in calculate_module_search_path()
870 if (calculate->home == NULL) { in calculate_module_search_path()
891 if (wcscpy_s(buf, bufsz - (buf - start_buf), calculate->home)) { in calculate_module_search_path()
956 calculate_path(PyCalculatePath *calculate, _PyPathConfig *pathconfig) in calculate_path() argument
977 status = calculate_pth_file(calculate, pathconfig, prefix, &pth_found); in calculate_path()
985 status = calculate_pyvenv_file(calculate, in calculate_path()
1002 calculate_home_prefix(calculate, argv0_path, zip_path, prefix); in calculate_path()
1005 status = calculate_module_search_path(calculate, pathconfig, in calculate_path()
1031 calculate_init(PyCalculatePath *calculate, _PyPathConfig *pathconfig, in calculate_init() argument
1034 calculate->home = pathconfig->home; in calculate_init()
1035 calculate->path_env = _wgetenv(L"PATH"); in calculate_init()
1037 calculate->pythonpath_env = config->pythonpath_env; in calculate_init()
1044 calculate_free(PyCalculatePath *calculate) in calculate_free() argument
1046 PyMem_RawFree(calculate->machine_path); in calculate_free()
1047 PyMem_RawFree(calculate->user_path); in calculate_free()
1082 PyCalculatePath calculate; in _PyPathConfig_Calculate() local
1083 memset(&calculate, 0, sizeof(calculate)); in _PyPathConfig_Calculate()
1085 status = calculate_init(&calculate, pathconfig, config); in _PyPathConfig_Calculate()
1090 status = calculate_path(&calculate, pathconfig); in _PyPathConfig_Calculate()
1093 calculate_free(&calculate); in _PyPathConfig_Calculate()