Add API for static strings, primarily good for identifiers.
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 3576ced..f0acead 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -99,7 +99,8 @@
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)