[Python-Dev] [Python-checkins] cpython: Fix #14600. Correct reference handling and naming of ImportError convenience (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Wed Apr 18 13:19:03 CEST 2012
- Previous message: [Python-Dev] [Python-checkins] cpython (2.7): Clean-up the SQLite introduction.
- Next message: [Python-Dev] [Python-checkins] cpython: Fix #14600. Correct reference handling and naming of ImportError convenience
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Apr 18, 2012 at 7:57 AM, brian.curtin <python-checkins at python.org> wrote:
diff --git a/Python/errors.c b/Python/errors.c --- a/Python/errors.c +++ b/Python/errors.c @@ -586,50 +586,43 @@ #endif /* MSWINDOWS */
PyObject * -PyErrSetExcWithArgsKwargs(PyObject *exc, PyObject *args, PyObject *kwargs) +PyErrSetImportError(PyObject *msg, PyObject *name, PyObject *path) { - PyObject *val; + PyObject *args, *kwargs, *error; + + args = PyTupleNew(1); + if (args == NULL) + return NULL; + + kwargs = PyDictNew(); + if (args == NULL) + return NULL; + + if (name == NULL) + name = PyNone; + + if (path == NULL) + path = PyNone;
Py_INCREF's?
Regards, Nick.
-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
- Previous message: [Python-Dev] [Python-checkins] cpython (2.7): Clean-up the SQLite introduction.
- Next message: [Python-Dev] [Python-checkins] cpython: Fix #14600. Correct reference handling and naming of ImportError convenience
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]