diff options
| author | Julian Andres Klode <jak@debian.org> | 2010-01-24 14:14:11 +0100 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2010-01-24 14:14:11 +0100 |
| commit | 1e2f8799f0b6fb2da2770150749b4dd6a208e494 (patch) | |
| tree | f5d46f23a15c5ee5937657e8a7ce95f3e6226963 /python | |
| parent | 70609e1f497832502cd25e874190d13c8ff628f0 (diff) | |
| download | python-apt-1e2f8799f0b6fb2da2770150749b4dd6a208e494.tar.gz | |
python/acquire-item.cc: Add GC support to AcquireItem.
AcquireItem is owned and owned items need to support the GC in
case someone subclasses Acquire and creates a circular reference.
Diffstat (limited to 'python')
| -rw-r--r-- | python/acquire-item.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/python/acquire-item.cc b/python/acquire-item.cc index 73aec1d6..24780f1c 100644 --- a/python/acquire-item.cc +++ b/python/acquire-item.cc @@ -226,10 +226,11 @@ PyTypeObject PyAcquireItem_Type = { 0, // tp_getattro 0, // tp_setattro 0, // tp_as_buffer - Py_TPFLAGS_DEFAULT, // tp_flags + Py_TPFLAGS_DEFAULT | + Py_TPFLAGS_HAVE_GC, // tp_flags "AcquireItem Object", // tp_doc - 0, // tp_traverse - 0, // tp_clear + CppOwnedTraverse<pkgAcquire::Item*>, // tp_traverse + CppOwnedClear<pkgAcquire::Item*>, // tp_clear 0, // tp_richcompare 0, // tp_weaklistoffset 0, // tp_iter |
