@@ -1522,7 +1522,7 @@ DB_pget(DBObject* self, PyObject* args, PyObject* kwargs)
15221522
15231523 if (self -> primaryDBType == DB_RECNO ||
15241524 self -> primaryDBType == DB_QUEUE )
1525- pkeyObj = PyInt_FromLong (* (long * )pkey .data );
1525+ pkeyObj = PyInt_FromLong (* (int * )pkey .data );
15261526 else
15271527 pkeyObj = PyString_FromStringAndSize (pkey .data , pkey .size );
15281528
@@ -1531,7 +1531,7 @@ DB_pget(DBObject* self, PyObject* args, PyObject* kwargs)
15311531 PyObject * keyObj ;
15321532 int type = _DB_get_type (self );
15331533 if (type == DB_RECNO || type == DB_QUEUE )
1534- keyObj = PyInt_FromLong (* (long * )key .data );
1534+ keyObj = PyInt_FromLong (* (int * )key .data );
15351535 else
15361536 keyObj = PyString_FromStringAndSize (key .data , key .size );
15371537 retval = Py_BuildValue ("OOO" , keyObj , pkeyObj , dataObj );
@@ -3172,7 +3172,7 @@ DBC_pget(DBCursorObject* self, PyObject* args, PyObject *kwargs)
31723172
31733173 if (self -> mydb -> primaryDBType == DB_RECNO ||
31743174 self -> mydb -> primaryDBType == DB_QUEUE )
3175- pkeyObj = PyInt_FromLong (* (long * )pkey .data );
3175+ pkeyObj = PyInt_FromLong (* (int * )pkey .data );
31763176 else
31773177 pkeyObj = PyString_FromStringAndSize (pkey .data , pkey .size );
31783178
@@ -3181,7 +3181,7 @@ DBC_pget(DBCursorObject* self, PyObject* args, PyObject *kwargs)
31813181 PyObject * keyObj ;
31823182 int type = _DB_get_type (self -> mydb );
31833183 if (type == DB_RECNO || type == DB_QUEUE )
3184- keyObj = PyInt_FromLong (* (long * )key .data );
3184+ keyObj = PyInt_FromLong (* (int * )key .data );
31853185 else
31863186 keyObj = PyString_FromStringAndSize (key .data , key .size );
31873187 retval = Py_BuildValue ("OOO" , keyObj , pkeyObj , dataObj );
0 commit comments