From 6338b8abafaef4dcdcf852cab049124cc4ecce06 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sun, 21 Jun 2009 14:46:19 +0200 Subject: python/acquire.cc, python/indexfile.cc: Do not delete the pointers for some objects. We can not delete the AcquireFile object's pointer on deallocation because this would cause the item to be removed from the fetcher, which would be incompatible to the previous behaviour. We can not delete the IndexFile object's pointer on deallocation because it is managed by other objects like MetaIndex. --- python/indexfile.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python/indexfile.cc') diff --git a/python/indexfile.cc b/python/indexfile.cc index 78a4f513..ba709872 100644 --- a/python/indexfile.cc +++ b/python/indexfile.cc @@ -22,7 +22,6 @@ static PyObject *PackageIndexFileArchiveURI(PyObject *Self,PyObject *Args) if (PyArg_ParseTuple(Args, "s",&path) == 0) return 0; - return HandleErrors(Safe_FromString(File->ArchiveURI(path).c_str())); } @@ -99,7 +98,8 @@ PyTypeObject PackageIndexFileType = sizeof(CppOwnedPyObject), // tp_basicsize 0, // tp_itemsize // Methods - CppOwnedDeallocPtr, // tp_dealloc + // Not ..Ptr, because the pointer is managed somewhere else. + CppOwnedDealloc, // tp_dealloc 0, // tp_print 0, // tp_getattr 0, // tp_setattr -- cgit v1.2.3