From 229fb1a3a35bade26cfff373087461d7a98aade3 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 4 May 2010 17:05:23 +0200 Subject: * apt-pkg/contrib/weakptr.h: - add a class WeakPointable which allows one to register weak pointers to an object which will be set to NULL when the object is deallocated. * [ABI break] apt-pkg/acquire{-worker,-item,}.h: - subclass pkgAcquire::{Worker,Item,ItemDesc} from WeakPointable. --- apt-pkg/acquire.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apt-pkg/acquire.h') diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h index 9e91a9f67..8e2c21151 100644 --- a/apt-pkg/acquire.h +++ b/apt-pkg/acquire.h @@ -67,6 +67,7 @@ #define PKGLIB_ACQUIRE_H #include +#include #include #include @@ -376,7 +377,7 @@ class pkgAcquire * * An item may have several assocated ItemDescs over its lifetime. */ -struct pkgAcquire::ItemDesc +struct pkgAcquire::ItemDesc : public WeakPointable { /** \brief The URI from which to download this item. */ string URI; -- cgit v1.2.3