summaryrefslogtreecommitdiff
path: root/python/apt_pkgmodule.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-04-13 18:41:05 +0200
committerJulian Andres Klode <jak@debian.org>2009-04-13 18:41:05 +0200
commiteaefd2f4cb97ed069375f18fb67d8570dc5eaed8 (patch)
tree5b87306720642912f2cd10186d0c803f69d45e02 /python/apt_pkgmodule.cc
parent506cb021d62e643fba38ddb4b84572a86cb3a3ba (diff)
downloadpython-apt-eaefd2f4cb97ed069375f18fb67d8570dc5eaed8.tar.gz
* apt/tag.cc: Rework TagFile using tp_methods and tp_getset
By using tp_methods and tp_getset instead of a function for tp_getattr, the resulting object is easier to understand and access to attributes and methods is faster. It also helps the port to Python 3, where Py_FindMethod does not exist anymore.
Diffstat (limited to 'python/apt_pkgmodule.cc')
-rw-r--r--python/apt_pkgmodule.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc
index 34669fd5..1417e5d0 100644
--- a/python/apt_pkgmodule.cc
+++ b/python/apt_pkgmodule.cc
@@ -474,6 +474,7 @@ extern "C" void initapt_pkg()
{
// Finalize our types to add slots, etc.
if (PyType_Ready(&TagSecType) == -1) return;
+ if (PyType_Ready(&TagFileType) == -1) return;
// Initialize the module
PyObject *Module = Py_InitModule("apt_pkg",methods);