summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire.h
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2010-05-04 17:05:23 +0200
committerJulian Andres Klode <jak@debian.org>2010-05-04 17:05:23 +0200
commit229fb1a3a35bade26cfff373087461d7a98aade3 (patch)
treee8c492f9c456243b5291c73030e83dd9e65897d3 /apt-pkg/acquire.h
parentaf8a8da9c1aa6506d230a0df8abc670661176ba3 (diff)
* 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.
Diffstat (limited to 'apt-pkg/acquire.h')
-rw-r--r--apt-pkg/acquire.h3
1 files changed, 2 insertions, 1 deletions
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 <apt-pkg/macros.h>
+#include <apt-pkg/weakptr.h>
#include <vector>
#include <string>
@@ -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;