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 | c3eb93fe1ce5f5ff2666fb9f34a6fd7c46279554 (patch) | |
| tree | 22327341f23de643b9a5232102b03e9bf05b2c06 /Python/_warnings.c | |
| parent | 38c3b0f952599c52b621ee06945432f1af635c16 (diff) | |
| download | cpython-c3eb93fe1ce5f5ff2666fb9f34a6fd7c46279554.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; |
