diff Python/sysmodule.c @ 72835:5e33219492bc

Add API for static strings, primarily good for identifiers. Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
author Martin v. Löwis <martin@v.loewis.de>
date Sun, 09 Oct 2011 10:38:36 +0200
parents b534b56379cb
children 81380082d216
line wrap: on
line diff
--- a/Python/sysmodule.c	Sun Oct 09 08:58:16 2011 +0200
+++ b/Python/sysmodule.c	Sun Oct 09 10:38:36 2011 +0200
@@ -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)