Mercurial > cpython-lru_cache-weakref
diff Python/bltinmodule.c @ 47301:23ab586c427a
Renamed PyString to PyBytes
| author | Christian Heimes <christian@cheimes.de> |
|---|---|
| date | Mon, 26 May 2008 13:28:38 +0000 |
| parents | 96b34263e448 |
| children | d57aa752a401 |
line wrap: on
line diff
--- a/Python/bltinmodule.c Mon May 26 13:22:05 2008 +0000 +++ b/Python/bltinmodule.c Mon May 26 13:28:38 2008 +0000 @@ -1350,10 +1350,10 @@ long ord; Py_ssize_t size; - if (PyString_Check(obj)) { - size = PyString_GET_SIZE(obj); + if (PyBytes_Check(obj)) { + size = PyBytes_GET_SIZE(obj); if (size == 1) { - ord = (long)((unsigned char)*PyString_AS_STRING(obj)); + ord = (long)((unsigned char)*PyBytes_AS_STRING(obj)); return PyLong_FromLong(ord); } } @@ -2267,7 +2267,7 @@ SETBUILTIN("bool", &PyBool_Type); SETBUILTIN("memoryview", &PyMemoryView_Type); SETBUILTIN("bytearray", &PyByteArray_Type); - SETBUILTIN("bytes", &PyString_Type); + SETBUILTIN("bytes", &PyBytes_Type); SETBUILTIN("classmethod", &PyClassMethod_Type); #ifndef WITHOUT_COMPLEX SETBUILTIN("complex", &PyComplex_Type);
