summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-09-20 10:33:44 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-09-20 10:33:44 +0200
commitb5be0185f39aa90b86d13848531173c7ebed6b7b (patch)
treedf4c847d5ed510ba733c8a9985b81275c79589e1 /python
parentb410a7e17e3a255127ef054b9a867354face49f3 (diff)
parentcb12be4893d8ac79dcbaa77e30cf61d69a4e859e (diff)
downloadpython-apt-b5be0185f39aa90b86d13848531173c7ebed6b7b.tar.gz
merged from lp:~mvo/python-apt/mvo
Diffstat (limited to 'python')
-rw-r--r--python/configuration.cc2
-rw-r--r--python/depcache.cc4
-rw-r--r--python/tag.cc6
3 files changed, 8 insertions, 4 deletions
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"
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
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..