From 1ee1b6fe0dd7baca0da50e365929d03d42128705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Mon, 10 Oct 2011 18:11:30 +0200 Subject: Use identifier API for PyObject_GetAttrString. --- Python/_warnings.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Python/_warnings.c') 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; -- cgit v1.2.1