Fix #14600. Correct reference handling and naming of ImportError convenience function

This commit is contained in:
Brian Curtin 2012-04-17 16:57:09 -05:00
parent fba807ac44
commit 09b86d1196
5 changed files with 37 additions and 59 deletions

View file

@ -254,9 +254,9 @@ dl_funcptr _PyImport_GetDynLoadWindows(const char *shortname,
theLength));
}
if (message != NULL) {
PyErr_SetFromImportErrorWithNameAndPath(message,
PyUnicode_FromString(shortname),
pathname);
PyErr_SetImportError(message, PyUnicode_FromString(shortname),
pathname);
Py_DECREF(message);
}
return NULL;
} else {