Mercurial > cpython-lru_cache-weakref
diff Python/errors.c @ 72848:81380082d216
Use identifier API for PyObject_GetAttrString.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Mon, 10 Oct 2011 18:11:30 +0200 |
| parents | 8beaa9a37387 |
| children | 41a1de81ef2b |
line wrap: on
line diff
--- a/Python/errors.c Mon Oct 10 03:21:36 2011 +0200 +++ b/Python/errors.c Mon Oct 10 18:11:30 2011 +0200 @@ -707,6 +707,7 @@ void PyErr_WriteUnraisable(PyObject *obj) { + _Py_identifier(__module__); PyObject *f, *t, *v, *tb; PyErr_Fetch(&t, &v, &tb); f = PySys_GetObject("stderr"); @@ -723,7 +724,7 @@ className = dot+1; } - moduleName = PyObject_GetAttrString(t, "__module__"); + moduleName = _PyObject_GetAttrId(t, &PyId___module__); if (moduleName == NULL) PyFile_WriteString("<unknown>", f); else {
