From 29353cf54289f80eaa5923a1c73a36fb0bf3abb9 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 15 Mar 2010 17:10:24 +0100 Subject: Correctly fix the last one, PyErr_Restore takes a reference. --- python/generic.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'python') diff --git a/python/generic.cc b/python/generic.cc index 84dda9aa..1c68a481 100644 --- a/python/generic.cc +++ b/python/generic.cc @@ -104,6 +104,9 @@ PyObject *_PyAptObject_getattro(PyObject *self, PyObject *attr) { PyErr_WarnEx(PyExc_DeprecationWarning, warning_string, 1); delete[] warning_string; } else { + Py_XINCREF(ptype); + Py_XINCREF(pvalue); + Py_XINCREF(ptraceback); PyErr_Restore(ptype, pvalue, ptraceback); } Py_DECREF(newattr); -- cgit v1.2.3