Kaydet (Commit) ed70c403 authored tarafından Thomas Heller's avatar Thomas Heller

Backport from trunk, rev. 1.11 and 1.12. Don't hardcode the Python

version number.
üst 05a24d7f
......@@ -1510,12 +1510,15 @@ static void CloseLogfile(void)
static HINSTANCE LoadPythonDll(char *fname)
{
char fullpath[_MAX_PATH];
char subkey_name[80];
LONG size = sizeof(fullpath);
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, "\\");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment