[Python-checkins] cpython: Issue #19437: Fix init_builtin(), handle _PyImport_FindExtensionObject()
victor.stinner
python-checkins at python.org
Thu Nov 14 22:56:38 CET 2013
http://hg.python.org/cpython/rev/f7d401eaee0e
changeset: 87107:f7d401eaee0e
user: Victor Stinner <victor.stinner at gmail.com>
date: Thu Nov 14 22:38:52 2013 +0100
summary:
Issue #19437: Fix init_builtin(), handle _PyImport_FindExtensionObject()
failure
files:
Python/import.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Python/import.c b/Python/import.c
--- a/Python/import.c
+++ b/Python/import.c
@@ -948,8 +948,12 @@
init_builtin(PyObject *name)
{
struct _inittab *p;
+ PyObject *mod;
- if (_PyImport_FindExtensionObject(name, name) != NULL)
+ mod = _PyImport_FindExtensionObject(name, name);
+ if (PyErr_Occurred())
+ return -1;
+ if (mod != NULL)
return 1;
for (p = PyImport_Inittab; p->name != NULL; p++) {
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list