From 90fa0ecbc1459e60a9fe78458d9ab7043a156f94 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 8 Sep 2010 12:12:13 +0200 Subject: * apt/debfile.py: - remove bogus comment * python/tag.cc: - allow "bytes" type in TagSecNew (for python3) --- python/tag.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/tag.cc b/python/tag.cc index 97039bc4..44cd06af 100644 --- a/python/tag.cc +++ b/python/tag.cc @@ -344,8 +344,12 @@ static PyObject *TagFileJump(PyObject *Self,PyObject *Args) // --------------------------------------------------------------------- static PyObject *TagSecNew(PyTypeObject *type,PyObject *Args,PyObject *kwds) { char *Data; + int Len; char *kwlist[] = {"text", 0}; - if (PyArg_ParseTupleAndKeywords(Args,kwds,"s",kwlist,&Data) == 0) + + // this allows reading "byte" types from python3 - but we don't + // make (much) use of it yet + if (PyArg_ParseTupleAndKeywords(Args,kwds,"s#",kwlist,&Data,&Len) == 0) return 0; // Create the object.. -- cgit v1.2.3 From 26d9cf8509128791461ca1a8c9b7ef1c28635290 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 13 Sep 2010 10:30:26 +0200 Subject: python/configuration.cc: fix typo in doc string --- python/configuration.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python') diff --git a/python/configuration.cc b/python/configuration.cc index 848b664a..93e92efa 100644 --- a/python/configuration.cc +++ b/python/configuration.cc @@ -157,7 +157,7 @@ static PyObject *CnfClear(PyObject *Self,PyObject *Args) // The amazing narrowing search ability! static const char *doc_SubTree = - "sub_tree(key: str) -> apt_pkg.Configuration\n\n" + "subtree(key: str) -> apt_pkg.Configuration\n\n" "Return a new apt_pkg.Configuration object with the given option\n" "as its root. Example:\n\n" -- cgit v1.2.3 From cb12be4893d8ac79dcbaa77e30cf61d69a4e859e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 20 Sep 2010 10:30:20 +0200 Subject: fix return type of DebSize() and UsrSize(), thanks to Sebastian Heinlein, LP: #642936 --- debian/changelog | 2 ++ python/depcache.cc | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/debian/changelog b/debian/changelog index 024a74b6..d930072c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,8 @@ python-apt (0.7.97.2) UNRELEASED; urgency=low templates * aptsources/distinfo.py, aptsources/distro.py: - support non-official templates (like extras.ubuntu.com) + * fix return type of DebSize() and UsrSize(), thanks to + Sebastian Heinlein, LP: #642936 -- Michael Vogt Fri, 27 Aug 2010 11:22:23 +0200 diff --git a/python/depcache.cc b/python/depcache.cc index cd098f2f..b7294644 100644 --- a/python/depcache.cc +++ b/python/depcache.cc @@ -650,10 +650,10 @@ static PyObject *PkgDepCacheGetBrokenCount(PyObject *Self,void*) { return Py_BuildValue("l", depcache->BrokenCount()); } static PyObject *PkgDepCacheGetUsrSize(PyObject *Self,void*) { - return Py_BuildValue("d", depcache->UsrSize()); + return Py_BuildValue("L", depcache->UsrSize()); } static PyObject *PkgDepCacheGetDebSize(PyObject *Self,void*) { - return Py_BuildValue("d", depcache->DebSize()); + return Py_BuildValue("L", depcache->DebSize()); } #undef depcache -- cgit v1.2.3