diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2011-10-10 18:11:30 +0200 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2011-10-10 18:11:30 +0200 |
commit | 1ee1b6fe0dd7baca0da50e365929d03d42128705 (patch) | |
tree | ae048787548a8915d3e75054a950f710ed521d84 /Python/_warnings.c | |
parent | 794d567b173e4cc10ad233aeb8743283ea9c3e6b (diff) | |
download | cpython-git-1ee1b6fe0dd7baca0da50e365929d03d42128705.tar.gz |
Use identifier API for PyObject_GetAttrString.
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r-- | Python/_warnings.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c index e5631079a9..ebc9cb808c 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -247,10 +247,11 @@ show_warning(PyObject *filename, int lineno, PyObject *text, PyObject PyObject *f_stderr; PyObject *name; char lineno_str[128]; + _Py_identifier(__name__); PyOS_snprintf(lineno_str, sizeof(lineno_str), ":%d: ", lineno); - name = PyObject_GetAttrString(category, "__name__"); + name = _PyObject_GetAttrId(category, &PyId___name__); if (name == NULL) /* XXX Can an object lack a '__name__' attribute? */ return; |