diff options
| author | Julian Andres Klode <jak@debian.org> | 2011-04-12 11:38:25 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2011-04-12 11:38:25 +0200 |
| commit | f441b008883170d6a8c4cfeb814b0c07a27e6afd (patch) | |
| tree | 6773ef5fec948428e98fd0a7bb6956372c21305f /python/indexrecords.cc | |
| parent | 91603aac68593f6749428825d7e94b75873927f4 (diff) | |
| download | python-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/indexrecords.cc')
| -rw-r--r-- | python/indexrecords.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/indexrecords.cc b/python/indexrecords.cc index d6a3263c..c7623cfd 100644 --- a/python/indexrecords.cc +++ b/python/indexrecords.cc @@ -63,7 +63,7 @@ static PyObject *indexrecords_lookup(PyObject *self,PyObject *args) // Copy the HashString(), to prevent crashes and to not require the // indexRecords object to exist. PyObject *py_hash = PyHashString_FromCpp(new HashString(result->Hash), true, NULL); - PyObject *value = Py_BuildValue("(Oi)",py_hash,result->Size); + PyObject *value = Py_BuildValue("(ON)",py_hash,MkPyNumber(result->Size)); Py_DECREF(py_hash); return value; } |
