From 52ecc81517a1fa9748d04f0c0d05ce8396233b71 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 3 May 2005 16:25:44 +0000 Subject: * merged with Greek0@gmx.net--2005-main, native apt interface added, fixed a refcount problem, added tests/ directory * apt/package.py, apt/__init__.py: - started a native python interface that will wrap the uglier bits of python-apt in the future * tests/pkgsrcrecords.py: - started a test directory * python/pkgsrcrecords.cc: - fixed a refcount problem - merged with Greek0s tree Patches applied: * Greek0@gmx.net--2005-main/python-apt--debian--0.6--base-0 tag of apt@packages.debian.org/python-apt--main--0--patch-8 * Greek0@gmx.net--2005-main/python-apt--debian--0.6--patch-1 Minor typo fix in debian/rules * Greek0@gmx.net--2005-main/python-apt--debian--0.6--patch-2 Typo fix in depcache.cc which caused wrong function to be called * Greek0@gmx.net--2005-main/python-apt--debian--0.6--patch-3 Improved CppPyObject, leading to a better PkgDepCacheStruct * Greek0@gmx.net--2005-main/python-apt--debian--0.6--patch-4 Improved build system * Greek0@gmx.net--2005-main/python-apt--debian--0.6--patch-5 Restored the old tar.cc to work with the older apt in debian again * Greek0@gmx.net--2005-main/python-apt--debian--0.6--patch-6 Fix for Debian #304296 (Segfault in CppOwnedDealloc) * Greek0@gmx.net--2005-main/python-apt--debian--0.6--patch-7 Fix for Debian #304903 (FD leak) * Greek0@gmx.net--2005-main/python-apt--debian--0.6--patch-8 Fixed the compilation error introduced in patch-6 * Greek0@gmx.net--2005-main/python-apt--debian--0.6--patch-9 New debian/changelog from Debians python-apt 0.6.10 * Greek0@gmx.net--2005-main/python-apt--debian--0.6--patch-10 Minor changes to make the packages lintian/linda clean * apt@packages.debian.org/python-apt--main--0--patch-8 Merge michael.vogt@ubuntu.com--2005/python-apt--pkgDepCache--0 --- python/generic.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'python/generic.h') diff --git a/python/generic.h b/python/generic.h index bcdf5806..a808e28d 100644 --- a/python/generic.h +++ b/python/generic.h @@ -33,6 +33,17 @@ template struct CppPyObject : public PyObject { + // We are only using CppPyObject and friends as dumb structs only, ie the + // c'tor is never called. + // However if T doesn't have a default c'tor C++ doesn't generate one for + // CppPyObject (since it can't know how it should initialize Object). + // + // This causes problems then in CppOwnedPyObject, for which C++ can't create + // a c'tor that calls the base class c'tor (which causes a compilation + // error). + // So basically having the c'tor here removes the need for T to have a + // default c'tor, which is not always desireable. + CppPyObject() { }; T Object; }; -- cgit v1.2.3