summaryrefslogtreecommitdiffstats
path: root/Modules/_struct.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/_struct.c
parent96d02f3c1e145821cd5ce8817d4263e7d8d57e4a (diff)
downloadcpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.zip
cpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.tar.gz
cpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.tar.bz2
Renamed PyBytes to PyByteArray
Diffstat (limited to 'Modules/_struct.c')
-rw-r--r--Modules/_struct.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/_struct.c b/Modules/_struct.c
index 13ffee7..c162e6d 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -1646,7 +1646,7 @@ s_pack_internal(PyStructObject *soself, PyObject *args, int offset, char* buf)
return -1;
}
isstring = PyString_Check(v);
- if (!isstring && !PyBytes_Check(v)) {
+ if (!isstring && !PyByteArray_Check(v)) {
PyErr_SetString(StructError,
"argument for 's' must be a string");
return -1;
@@ -1656,8 +1656,8 @@ s_pack_internal(PyStructObject *soself, PyObject *args, int offset, char* buf)
p = PyString_AS_STRING(v);
}
else {
- n = PyBytes_GET_SIZE(v);
- p = PyBytes_AS_STRING(v);
+ n = PyByteArray_GET_SIZE(v);
+ p = PyByteArray_AS_STRING(v);
}
if (n > code->size)
n = code->size;
@@ -1672,7 +1672,7 @@ s_pack_internal(PyStructObject *soself, PyObject *args, int offset, char* buf)
return -1;
}
isstring = PyString_Check(v);
- if (!isstring && !PyBytes_Check(v)) {
+ if (!isstring && !PyByteArray_Check(v)) {
PyErr_SetString(StructError,
"argument for 'p' must be a string");
return -1;
@@ -1682,8 +1682,8 @@ s_pack_internal(PyStructObject *soself, PyObject *args, int offset, char* buf)
p = PyString_AS_STRING(v);
}
else {
- n = PyBytes_GET_SIZE(v);
- p = PyBytes_AS_STRING(v);
+ n = PyByteArray_GET_SIZE(v);
+ p = PyByteArray_AS_STRING(v);
}
if (n > (code->size - 1))
n = code->size - 1;