From f441b008883170d6a8c4cfeb814b0c07a27e6afd Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 12 Apr 2011 11:38:25 +0200 Subject: 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. --- python/pkgmanager.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/pkgmanager.cc') diff --git a/python/pkgmanager.cc b/python/pkgmanager.cc index 95e8c27e..a65c88f8 100644 --- a/python/pkgmanager.cc +++ b/python/pkgmanager.cc @@ -79,7 +79,7 @@ static PyObject *PkgManagerDoInstall(PyObject *Self,PyObject *Args) pkgPackageManager::OrderResult res = pm->DoInstall(status_fd); - return HandleErrors(Py_BuildValue("i",res)); + return HandleErrors(MkPyNumber(res)); } static PyObject *PkgManagerFixMissing(PyObject *Self,PyObject *Args) -- cgit v1.2.3