Add API for static strings, primarily good for identifiers.

Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
This commit is contained in:
Martin v. Löwis 2011-10-09 10:38:36 +02:00
parent 67df285a33
commit afe55bba33
50 changed files with 578 additions and 240 deletions

View file

@ -99,7 +99,8 @@ sys_displayhook_unencodable(PyObject *outf, PyObject *o)
buffer = PyObject_GetAttrString(outf, "buffer");
if (buffer) {
result = PyObject_CallMethod(buffer, "write", "(O)", encoded);
_Py_identifier(write);
result = _PyObject_CallMethodId(buffer, &PyId_write, "(O)", encoded);
Py_DECREF(buffer);
Py_DECREF(encoded);
if (result == NULL)