comparison Python/sysmodule.c @ 72925:7109f31300fb

Rename _Py_identifier to _Py_IDENTIFIER.
author Martin v. Löwis <martin@v.loewis.de>
date Fri, 14 Oct 2011 10:20:37 +0200
parents 81380082d216
children db4aa878cea2
comparison
equal deleted inserted replaced
72924:158430b2b552 72925:7109f31300fb
77 { 77 {
78 PyObject *stdout_encoding = NULL; 78 PyObject *stdout_encoding = NULL;
79 PyObject *encoded, *escaped_str, *repr_str, *buffer, *result; 79 PyObject *encoded, *escaped_str, *repr_str, *buffer, *result;
80 char *stdout_encoding_str; 80 char *stdout_encoding_str;
81 int ret; 81 int ret;
82 _Py_identifier(encoding); 82 _Py_IDENTIFIER(encoding);
83 _Py_identifier(buffer); 83 _Py_IDENTIFIER(buffer);
84 84
85 stdout_encoding = _PyObject_GetAttrId(outf, &PyId_encoding); 85 stdout_encoding = _PyObject_GetAttrId(outf, &PyId_encoding);
86 if (stdout_encoding == NULL) 86 if (stdout_encoding == NULL)
87 goto error; 87 goto error;
88 stdout_encoding_str = _PyUnicode_AsString(stdout_encoding); 88 stdout_encoding_str = _PyUnicode_AsString(stdout_encoding);
99 if (encoded == NULL) 99 if (encoded == NULL)
100 goto error; 100 goto error;
101 101
102 buffer = _PyObject_GetAttrId(outf, &PyId_buffer); 102 buffer = _PyObject_GetAttrId(outf, &PyId_buffer);
103 if (buffer) { 103 if (buffer) {
104 _Py_identifier(write); 104 _Py_IDENTIFIER(write);
105 result = _PyObject_CallMethodId(buffer, &PyId_write, "(O)", encoded); 105 result = _PyObject_CallMethodId(buffer, &PyId_write, "(O)", encoded);
106 Py_DECREF(buffer); 106 Py_DECREF(buffer);
107 Py_DECREF(encoded); 107 Py_DECREF(encoded);
108 if (result == NULL) 108 if (result == NULL)
109 goto error; 109 goto error;
1841 static int 1841 static int
1842 sys_pyfile_write_unicode(PyObject *unicode, PyObject *file) 1842 sys_pyfile_write_unicode(PyObject *unicode, PyObject *file)
1843 { 1843 {
1844 PyObject *writer = NULL, *args = NULL, *result = NULL; 1844 PyObject *writer = NULL, *args = NULL, *result = NULL;
1845 int err; 1845 int err;
1846 _Py_identifier(write); 1846 _Py_IDENTIFIER(write);
1847 1847
1848 if (file == NULL) 1848 if (file == NULL)
1849 return -1; 1849 return -1;
1850 1850
1851 writer = _PyObject_GetAttrId(file, &PyId_write); 1851 writer = _PyObject_GetAttrId(file, &PyId_write);