diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2008-09-06 21:34:51 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2008-09-06 21:34:51 (GMT) |
commit | 0a608fdaac5b4422b9ade6ec7b44182902f2f9ce (patch) | |
tree | 80f50c009d21accfd42b8a736ce9761370169995 /Modules/_dbmmodule.c | |
parent | 7e958d1ceb0b92fa7bace7040ce042474d3ea510 (diff) | |
download | cpython-0a608fdaac5b4422b9ade6ec7b44182902f2f9ce.zip cpython-0a608fdaac5b4422b9ade6ec7b44182902f2f9ce.tar.gz cpython-0a608fdaac5b4422b9ade6ec7b44182902f2f9ce.tar.bz2 |
fixes deferred/release blocker issue #3797: Fixed the dbm, marshal, mmap,
ossaudiodev, & winreg modules to return bytes objects instead of bytearray
objects.
Diffstat (limited to 'Modules/_dbmmodule.c')
-rw-r--r-- | Modules/_dbmmodule.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/_dbmmodule.c b/Modules/_dbmmodule.c index 78eba36..d43acdc 100644 --- a/Modules/_dbmmodule.c +++ b/Modules/_dbmmodule.c @@ -111,7 +111,7 @@ dbm_subscript(dbmobject *dp, register PyObject *key) PyErr_SetString(DbmError, ""); return NULL; } - return PyByteArray_FromStringAndSize(drec.dptr, drec.dsize); + return PyBytes_FromStringAndSize(drec.dptr, drec.dsize); } static int @@ -188,7 +188,7 @@ dbm_keys(register dbmobject *dp, PyObject *unused) return NULL; for (key = dbm_firstkey(dp->di_dbm); key.dptr; key = dbm_nextkey(dp->di_dbm)) { - item = PyByteArray_FromStringAndSize(key.dptr, key.dsize); + item = PyBytes_FromStringAndSize(key.dptr, key.dsize); if (item == NULL) { Py_DECREF(v); return NULL; @@ -260,7 +260,7 @@ dbm_get(register dbmobject *dp, PyObject *args) check_dbmobject_open(dp); val = dbm_fetch(dp->di_dbm, key); if (val.dptr != NULL) - return PyByteArray_FromStringAndSize(val.dptr, val.dsize); + return PyBytes_FromStringAndSize(val.dptr, val.dsize); else { Py_INCREF(defvalue); return defvalue; @@ -283,9 +283,9 @@ dbm_setdefault(register dbmobject *dp, PyObject *args) check_dbmobject_open(dp); val = dbm_fetch(dp->di_dbm, key); if (val.dptr != NULL) - return PyByteArray_FromStringAndSize(val.dptr, val.dsize); + return PyBytes_FromStringAndSize(val.dptr, val.dsize); if (defvalue == NULL) { - defvalue = PyByteArray_FromStringAndSize(NULL, 0); + defvalue = PyBytes_FromStringAndSize(NULL, 0); if (defvalue == NULL) return NULL; val.dptr = NULL; |