summaryrefslogtreecommitdiffstats
path: root/Modules/_bsddb.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-05-26 13:22:05 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-05-26 13:22:05 (GMT)
commit9c4756ea265b5ebd71c9ae59f3673c7cecb6f060 (patch)
tree642b21e774a9cb2d949e10ce65e7d10326c70138 /Modules/_bsddb.c
parent96d02f3c1e145821cd5ce8817d4263e7d8d57e4a (diff)
downloadcpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.zip
cpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.tar.gz
cpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.tar.bz2
Renamed PyBytes to PyByteArray
Diffstat (limited to 'Modules/_bsddb.c')
-rw-r--r--Modules/_bsddb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c
index 02973aa..28f2caf 100644
--- a/Modules/_bsddb.c
+++ b/Modules/_bsddb.c
@@ -1174,14 +1174,14 @@ _db_associateCallback(DB* db, const DBT* priKey, const DBT* priData,
else if (PyLong_Check(result)) {
retval = PyLong_AsLong(result);
}
- else if (PyBytes_Check(result) || PyString_Check(result)) {
+ else if (PyByteArray_Check(result) || PyString_Check(result)) {
char* data;
Py_ssize_t size;
CLEAR_DBT(*secKey);
size = Py_SIZE(result);
- if (PyBytes_Check(result))
- data = PyBytes_AS_STRING(result);
+ if (PyByteArray_Check(result))
+ data = PyByteArray_AS_STRING(result);
else
data = PyString_AS_STRING(result);
secKey->flags = DB_DBT_APPMALLOC; /* DB will free */