summaryrefslogtreecommitdiffstats
path: root/Objects/abstract.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-05-11 23:43:38 (GMT)
committerGitHub <noreply@github.com>2020-05-11 23:43:38 (GMT)
commit4804b5b3df82e7892ca0550b02f902bcfc16bb48 (patch)
treea5c199a893d417fcce434e4412373e9a3ecd557f /Objects/abstract.c
parent27c0d9b54abaa4112d5a317b8aa78b39ad60a808 (diff)
downloadcpython-4804b5b3df82e7892ca0550b02f902bcfc16bb48.zip
cpython-4804b5b3df82e7892ca0550b02f902bcfc16bb48.tar.gz
cpython-4804b5b3df82e7892ca0550b02f902bcfc16bb48.tar.bz2
bpo-39465: Don't access directly _Py_Identifier members (GH-20043)
* Replace id->object with _PyUnicode_FromId(&id) * Use _Py_static_string_init(str) macro to initialize statically name_op in typeobject.c.
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r--Objects/abstract.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 6e390dd..b014f79 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -2287,7 +2287,7 @@ method_output_as_list(PyObject *o, _Py_Identifier *meth_id)
PyErr_Format(PyExc_TypeError,
"%.200s.%U() returned a non-iterable (type %.200s)",
Py_TYPE(o)->tp_name,
- meth_id->object,
+ _PyUnicode_FromId(meth_id),
Py_TYPE(meth_output)->tp_name);
}
Py_DECREF(meth_output);