svn+ssh://pythondev@svn.python.org/python/trunk
........
r72357 | benjamin.peterson | 2009-05-05 16:09:21 -0500 (Tue, 05 May 2009) | 4 lines
fix running test_capi with -R ::
Also, fix a refleak in the test that was preventing running. :)
........
long hash;
type = &_HashInheritanceTester_Type;
+
+ if (type->tp_dict != NULL)
+ /* The type has already been initialized. This probably means -R
+ is being used. */
+ Py_RETURN_NONE;
+
+
obj = PyObject_New(PyObject, type);
if (obj == NULL) {
PyErr_Clear();
return NULL;
}
+ Py_DECREF(obj);
+
Py_RETURN_NONE;
}