summaryrefslogtreecommitdiff
path: root/Modules/_dbmmodule.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-05-26 13:28:38 +0000
committerChristian Heimes <christian@cheimes.de>2008-05-26 13:28:38 +0000
commit72b710a59617ebe6dd1c41613d2c7eb81702efd9 (patch)
treecd134cc11c49ba09f50e44a9f36b69f2b0ffc893 /Modules/_dbmmodule.c
parent9c4756ea265b5ebd71c9ae59f3673c7cecb6f060 (diff)
downloadcpython-git-72b710a59617ebe6dd1c41613d2c7eb81702efd9.tar.gz
Renamed PyString to PyBytes
Diffstat (limited to 'Modules/_dbmmodule.c')
-rw-r--r--Modules/_dbmmodule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_dbmmodule.c b/Modules/_dbmmodule.c
index 8484d94553..ddfd4cd759 100644
--- a/Modules/_dbmmodule.c
+++ b/Modules/_dbmmodule.c
@@ -219,14 +219,14 @@ dbm_contains(PyObject *self, PyObject *arg)
if (arg == NULL)
return -1;
}
- if (!PyString_Check(arg)) {
+ if (!PyBytes_Check(arg)) {
PyErr_Format(PyExc_TypeError,
"dbm key must be string, not %.100s",
arg->ob_type->tp_name);
return -1;
}
- key.dptr = PyString_AS_STRING(arg);
- key.dsize = PyString_GET_SIZE(arg);
+ key.dptr = PyBytes_AS_STRING(arg);
+ key.dsize = PyBytes_GET_SIZE(arg);
val = dbm_fetch(dp->di_dbm, key);
return val.dptr != NULL;
}