Fix some of the remaining test_capi refleaks

This commit is contained in:
Antoine Pitrou 2012-01-18 21:29:05 +01:00
parent 84091bfa45
commit 8b0a74e936
1 changed files with 2 additions and 0 deletions

View File

@ -2225,6 +2225,7 @@ PyObject *PyExc_RecursionErrorInst = NULL;
Py_FatalError("Module dictionary insertion problem.");
#define INIT_ALIAS(NAME, TYPE) Py_INCREF(PyExc_ ## TYPE); \
Py_XDECREF(PyExc_ ## NAME); \
PyExc_ ## NAME = PyExc_ ## TYPE; \
if (PyDict_SetItemString(bdict, # NAME, PyExc_ ## NAME)) \
Py_FatalError("Module dictionary insertion problem.");
@ -2234,6 +2235,7 @@ PyObject *PyExc_RecursionErrorInst = NULL;
assert(_PyObject_RealIsSubclass(PyExc_ ## TYPE, PyExc_OSError)); \
if (!_code || PyDict_SetItem(errnomap, _code, PyExc_ ## TYPE)) \
Py_FatalError("errmap insertion problem."); \
Py_DECREF(_code); \
}
#ifdef MS_WINDOWS