]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport of rev. 1.12 from the trunk.
authorThomas Heller <theller@ctypes.org>
Wed, 22 Dec 2004 16:33:38 +0000 (16:33 +0000)
committerThomas Heller <theller@ctypes.org>
Wed, 22 Dec 2004 16:33:38 +0000 (16:33 +0000)
PC/bdist_wininst/install.c

index d268624e98d5e1cf08cdd5bbddd2570d67efec46..3d0eacdfd8e186f7472f393fa566cab4cc24c24e 100644 (file)
@@ -612,11 +612,14 @@ static HINSTANCE LoadPythonDll(char *fname)
 {
        char fullpath[_MAX_PATH];
        LONG size = sizeof(fullpath);
+       char subkeyname[80];
        HINSTANCE h = LoadLibrary(fname);
        if (h)
                return h;
-       if (ERROR_SUCCESS != RegQueryValue(HKEY_CURRENT_USER,
-                                          "SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath",
+       wsprintf(subkey_name,
+                "SOFTWARE\\Python\\PythonCore\\%d.%d\\InstallPath",
+                py_major, py_minor);
+       if (ERROR_SUCCESS != RegQueryValue(HKEY_CURRENT_USER, subkey_name,
                                           fullpath, &size))
                return NULL;
        strcat(fullpath, "\\");