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.
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.