diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-01-05 05:45:12 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-01-05 05:45:12 (GMT) |
commit | 4e90d912e5d7bf1401d9e6cd6f1c62783a4051bc (patch) | |
tree | 645a51ba2900744685494be069e1b68202dd28a0 | |
parent | a58cbd5f4709b97740ff6ae9276f2709b386876e (diff) | |
download | cpython-4e90d912e5d7bf1401d9e6cd6f1c62783a4051bc.zip cpython-4e90d912e5d7bf1401d9e6cd6f1c62783a4051bc.tar.gz cpython-4e90d912e5d7bf1401d9e6cd6f1c62783a4051bc.tar.bz2 |
Backport: Fix errors on 64-bit platforms. (There are still some test problems
-rw-r--r-- | Misc/NEWS | 2 | ||||
-rw-r--r-- | Modules/_bsddb.c | 8 |
2 files changed, 6 insertions, 4 deletions
@@ -38,6 +38,8 @@ Core and builtins Extension Modules ----------------- +- Fix 64-bit problems in bsddb. + - Bug #1290333: Added a workaround for cjkcodecs' _codecs_cn build problem on AIX. diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c index 2712e3d..a834cba 100644 --- a/Modules/_bsddb.c +++ b/Modules/_bsddb.c @@ -1510,7 +1510,7 @@ DB_pget(DBObject* self, PyObject* args, PyObject* kwargs) if (self->primaryDBType == DB_RECNO || self->primaryDBType == DB_QUEUE) - pkeyObj = PyInt_FromLong(*(long *)pkey.data); + pkeyObj = PyInt_FromLong(*(int *)pkey.data); else pkeyObj = PyString_FromStringAndSize(pkey.data, pkey.size); @@ -1519,7 +1519,7 @@ DB_pget(DBObject* self, PyObject* args, PyObject* kwargs) PyObject *keyObj; int type = _DB_get_type(self); if (type == DB_RECNO || type == DB_QUEUE) - keyObj = PyInt_FromLong(*(long *)key.data); + keyObj = PyInt_FromLong(*(int *)key.data); else keyObj = PyString_FromStringAndSize(key.data, key.size); retval = Py_BuildValue("OOO", keyObj, pkeyObj, dataObj); @@ -2991,7 +2991,7 @@ DBC_pget(DBCursorObject* self, PyObject* args, PyObject *kwargs) if (self->mydb->primaryDBType == DB_RECNO || self->mydb->primaryDBType == DB_QUEUE) - pkeyObj = PyInt_FromLong(*(long *)pkey.data); + pkeyObj = PyInt_FromLong(*(int *)pkey.data); else pkeyObj = PyString_FromStringAndSize(pkey.data, pkey.size); @@ -3000,7 +3000,7 @@ DBC_pget(DBCursorObject* self, PyObject* args, PyObject *kwargs) PyObject *keyObj; int type = _DB_get_type(self->mydb); if (type == DB_RECNO || type == DB_QUEUE) - keyObj = PyInt_FromLong(*(long *)key.data); + keyObj = PyInt_FromLong(*(int *)key.data); else keyObj = PyString_FromStringAndSize(key.data, key.size); retval = Py_BuildValue("OOO", keyObj, pkeyObj, dataObj); |