diff options
author | Christian Heimes <christian@cheimes.de> | 2008-05-26 13:22:05 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-05-26 13:22:05 (GMT) |
commit | 9c4756ea265b5ebd71c9ae59f3673c7cecb6f060 (patch) | |
tree | 642b21e774a9cb2d949e10ce65e7d10326c70138 /Python/bltinmodule.c | |
parent | 96d02f3c1e145821cd5ce8817d4263e7d8d57e4a (diff) | |
download | cpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.zip cpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.tar.gz cpython-9c4756ea265b5ebd71c9ae59f3673c7cecb6f060.tar.bz2 |
Renamed PyBytes to PyByteArray
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r-- | Python/bltinmodule.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 23e87b3..4ff0823 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -1377,11 +1377,11 @@ builtin_ord(PyObject *self, PyObject* obj) } #endif } - else if (PyBytes_Check(obj)) { + else if (PyByteArray_Check(obj)) { /* XXX Hopefully this is temporary */ - size = PyBytes_GET_SIZE(obj); + size = PyByteArray_GET_SIZE(obj); if (size == 1) { - ord = (long)((unsigned char)*PyBytes_AS_STRING(obj)); + ord = (long)((unsigned char)*PyByteArray_AS_STRING(obj)); return PyLong_FromLong(ord); } } @@ -1823,7 +1823,7 @@ builtin_sum(PyObject *self, PyObject *args) Py_DECREF(iter); return NULL; } - if (PyBytes_Check(result)) { + if (PyByteArray_Check(result)) { PyErr_SetString(PyExc_TypeError, "sum() can't sum bytes [use b''.join(seq) instead]"); Py_DECREF(iter); @@ -2266,7 +2266,7 @@ _PyBuiltin_Init(void) SETBUILTIN("True", Py_True); SETBUILTIN("bool", &PyBool_Type); SETBUILTIN("memoryview", &PyMemoryView_Type); - SETBUILTIN("bytearray", &PyBytes_Type); + SETBUILTIN("bytearray", &PyByteArray_Type); SETBUILTIN("bytes", &PyString_Type); SETBUILTIN("classmethod", &PyClassMethod_Type); #ifndef WITHOUT_COMPLEX |