From 14a0a07a331c936537a346f69e3c39db175e00cf Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 14 Jan 2014 21:53:48 +0100 Subject: python/pkgmanager.cc: Do not create temporary CppPyRef Instead of creating a CppPyRef with the only purpose of destroying it, just decrement the reference count. Reported-by: cppcheck --- python/pkgmanager.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python') diff --git a/python/pkgmanager.cc b/python/pkgmanager.cc index cf19e6bf..05f033f3 100644 --- a/python/pkgmanager.cc +++ b/python/pkgmanager.cc @@ -191,7 +191,7 @@ class PyPkgManager : public pkgDPkgPM { StatusFd)); } virtual void Reset() { - CppPyRef(PyObject_CallMethod(pyinst, "reset", NULL)); + Py_XDECREF(PyObject_CallMethod(pyinst, "reset", NULL)); } public: -- cgit v1.2.3