From eaefd2f4cb97ed069375f18fb67d8570dc5eaed8 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 13 Apr 2009 18:41:05 +0200 Subject: * 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. --- python/apt_pkgmodule.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'python/apt_pkgmodule.cc') 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); -- cgit v1.2.3