summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-01-05 05:43:35 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-01-05 05:43:35 (GMT)
commit40c6b47ca1e69f5b91b8ce3bd271865cb5a7d443 (patch)
tree1b5c5f3569413fb9cb47870a77a5f2bc24963fb0 /Modules
parent5f861429868a72c8a2883bf55778551a65fd34db (diff)
downloadcpython-40c6b47ca1e69f5b91b8ce3bd271865cb5a7d443.zip
cpython-40c6b47ca1e69f5b91b8ce3bd271865cb5a7d443.tar.gz
cpython-40c6b47ca1e69f5b91b8ce3bd271865cb5a7d443.tar.bz2
Fix errors on 64-bit platforms. Will backport
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_bsddb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c
index 59931c3..6f4da7e 100644
--- a/Modules/_bsddb.c
+++ b/Modules/_bsddb.c
@@ -1522,7 +1522,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);
@@ -1531,7 +1531,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);
@@ -3172,7 +3172,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);
@@ -3181,7 +3181,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);