Re: [Python-Dev] [Python-checkins] cpython: Fix #14600. Correct reference handling and naming of ImportError convenience

18 Apr
2012
18 Apr
'12
1:19 p.m.
On Wed, Apr 18, 2012 at 7:57 AM, brian.curtin python-checkins@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 /* MS_WINDOWS */
PyObject * -PyErr_SetExcWithArgsKwargs(PyObject *exc, PyObject *args, PyObject *kwargs) +PyErr_SetImportError(PyObject *msg, PyObject *name, PyObject *path) {
- PyObject *val;
- PyObject *args, *kwargs, *error;
- args = PyTuple_New(1);
- if (args == NULL)
- return NULL;
- kwargs = PyDict_New();
- if (args == NULL)
- return NULL;
- if (name == NULL)
- name = Py_None;
- if (path == NULL)
- path = Py_None;
Py_INCREF's?
Regards, Nick.
--
Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia

18 Apr
18 Apr
1:28 p.m.
New subject: [Python-checkins] cpython: Fix #14600. Correct reference handling and naming of ImportError convenience
On Wed, Apr 18, 2012 at 09:19:03PM +1000, Nick Coghlan ncoghlan@gmail.com wrote:
On Wed, Apr 18, 2012 at 7:57 AM, brian.curtin python-checkins@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 @@
- args = PyTuple_New(1);
- if (args == NULL)
- return NULL;
- kwargs = PyDict_New();
- if (args == NULL)
- return NULL;
Shouldn't the second test be if (kwargs == NULL) ???
Oleg.
--
Oleg Broytman http://phdru.name/ phd@phdru.name
Programmers don't die, they just GOSUB without RETURN.
4174
Age (days ago)
4174
Last active (days ago)
1 comments
2 participants
participants (2)
-
Nick Coghlan
-
Oleg Broytman