summaryrefslogtreecommitdiff
path: root/python/indexfile.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2011-04-12 11:38:25 +0200
committerJulian Andres Klode <jak@debian.org>2011-04-12 11:38:25 +0200
commitf441b008883170d6a8c4cfeb814b0c07a27e6afd (patch)
tree6773ef5fec948428e98fd0a7bb6956372c21305f /python/indexfile.cc
parent91603aac68593f6749428825d7e94b75873927f4 (diff)
downloadpython-apt-f441b008883170d6a8c4cfeb814b0c07a27e6afd.tar.gz
apt_pkg: Fix unsigned/long-vs-int issues (LP: #610820)
This fix is large, but simple in concept. Instead of relying on Py_BuildValue and type signatures, or type-specific conversion functions, create a new set of overloaded MkPyNumber() functions that automatically do the right thing for each numerical type.
Diffstat (limited to 'python/indexfile.cc')
-rw-r--r--python/indexfile.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/indexfile.cc b/python/indexfile.cc
index 037be210..bf0df516 100644
--- a/python/indexfile.cc
+++ b/python/indexfile.cc
@@ -47,7 +47,7 @@ static PyObject *IndexFileGetHasPackages(PyObject *Self,void*) {
return PyBool_FromLong((File->HasPackages()));
}
static PyObject *IndexFileGetSize(PyObject *Self,void*) {
- return Py_BuildValue("i",(File->Size()));
+ return MkPyNumber((File->Size()));
}
static PyObject *IndexFileGetIsTrusted(PyObject *Self,void*) {
return PyBool_FromLong((File->IsTrusted()));