diff options
author | Christian Heimes <christian@cheimes.de> | 2008-05-26 12:29:14 +0000 |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-05-26 12:29:14 +0000 |
commit | 3497f9447633b0a60a0b42ba06f2246805b20bb9 (patch) | |
tree | adbb433e1bbe57b2fa11c6810eb962b75f663db6 /Python | |
parent | b4701e638c1030e575adf441aab01ad6319cc83d (diff) | |
download | cpython-git-3497f9447633b0a60a0b42ba06f2246805b20bb9.tar.gz |
First step of the C API rename:
renamed Include/bytesobject.h to Include/bytearrayobject.h
renamed Include/stringobject.h to Include/bytesobject.h
added Include/stringobject.h with aliases
Diffstat (limited to 'Python')
-rw-r--r-- | Python/bltinmodule.c | 8 | ||||
-rw-r--r-- | Python/pythonrun.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 0234b6bd80..8734822b27 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -1498,10 +1498,10 @@ builtin_ord(PyObject *self, PyObject* obj) ord = (long)((unsigned char)*PyString_AS_STRING(obj)); return PyInt_FromLong(ord); } - } else if (PyBytes_Check(obj)) { - size = PyBytes_GET_SIZE(obj); + } else if (PyByteArray_Check(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 PyInt_FromLong(ord); } @@ -2618,7 +2618,7 @@ _PyBuiltin_Init(void) SETBUILTIN("basestring", &PyBaseString_Type); SETBUILTIN("bool", &PyBool_Type); /* SETBUILTIN("memoryview", &PyMemoryView_Type); */ - SETBUILTIN("bytearray", &PyBytes_Type); + SETBUILTIN("bytearray", &PyByteArray_Type); SETBUILTIN("bytes", &PyString_Type); SETBUILTIN("buffer", &PyBuffer_Type); SETBUILTIN("classmethod", &PyClassMethod_Type); diff --git a/Python/pythonrun.c b/Python/pythonrun.c index faca12f9ad..9880b94de1 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -169,7 +169,7 @@ Py_InitializeEx(int install_sigs) if (!_PyInt_Init()) Py_FatalError("Py_Initialize: can't init ints"); - if (!PyBytes_Init()) + if (!PyByteArray_Init()) Py_FatalError("Py_Initialize: can't init bytearray"); _PyFloat_Init(); @@ -451,7 +451,7 @@ Py_Finalize(void) PyList_Fini(); PySet_Fini(); PyString_Fini(); - PyBytes_Fini(); + PyByteArray_Fini(); PyInt_Fini(); PyFloat_Fini(); PyDict_Fini(); |