summaryrefslogtreecommitdiffstats
path: root/Python/errors.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/errors.c')
-rw-r--r--Python/errors.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/errors.c b/Python/errors.c
index 7fc4c97..a64900b 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -557,7 +557,8 @@ PyErr_NewException(char *name, PyObject *base, PyObject *dict)
bases = PyTuple_Pack(1, base);
if (bases == NULL)
goto failure;
- result = PyClass_New(bases, dict, classname);
+ result = PyObject_CallFunction((PyObject *) (base->ob_type),
+ "OOO", classname, bases, dict);
failure:
Py_XDECREF(bases);
Py_XDECREF(mydict);