diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2011-10-10 16:11:30 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2011-10-10 16:11:30 (GMT) |
commit | 1ee1b6fe0dd7baca0da50e365929d03d42128705 (patch) | |
tree | ae048787548a8915d3e75054a950f710ed521d84 /Python/errors.c | |
parent | 794d567b173e4cc10ad233aeb8743283ea9c3e6b (diff) | |
download | cpython-1ee1b6fe0dd7baca0da50e365929d03d42128705.zip cpython-1ee1b6fe0dd7baca0da50e365929d03d42128705.tar.gz cpython-1ee1b6fe0dd7baca0da50e365929d03d42128705.tar.bz2 |
Use identifier API for PyObject_GetAttrString.
Diffstat (limited to 'Python/errors.c')
-rw-r--r-- | Python/errors.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/errors.c b/Python/errors.c index 149151e..02f84b4 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -707,6 +707,7 @@ PyErr_NewExceptionWithDoc(const char *name, const char *doc, 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 @@ PyErr_WriteUnraisable(PyObject *obj) className = dot+1; } - moduleName = PyObject_GetAttrString(t, "__module__"); + moduleName = _PyObject_GetAttrId(t, &PyId___module__); if (moduleName == NULL) PyFile_WriteString("<unknown>", f); else { |