This commit is contained in:
Richard Oudkerk 2013-06-10 15:45:30 +01:00
commit cac17b4d78
2 changed files with 5 additions and 2 deletions

View File

@ -10,6 +10,8 @@ What's New in Python 3.4.0 Alpha 1?
Core and Builtins
-----------------
- Issue #18180: Fix ref leak in _PyImport_GetDynLoadWindows().
- Issue #18038: SyntaxError raised during compilation sources with illegal
encoding now always contains an encoding name.

View File

@ -262,8 +262,9 @@ dl_funcptr _PyImport_GetDynLoadWindows(const char *shortname,
theLength));
}
if (message != NULL) {
PyErr_SetImportError(message, PyUnicode_FromString(shortname),
pathname);
PyObject *shortname_obj = PyUnicode_FromString(shortname);
PyErr_SetImportError(message, shortname_obj, pathname);
Py_XDECREF(shortname_obj);
Py_DECREF(message);
}
return NULL;