diff options
author | Victor Stinner <vstinner@python.org> | 2020-05-11 23:43:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-11 23:43:38 (GMT) |
commit | 4804b5b3df82e7892ca0550b02f902bcfc16bb48 (patch) | |
tree | a5c199a893d417fcce434e4412373e9a3ecd557f /Python | |
parent | 27c0d9b54abaa4112d5a317b8aa78b39ad60a808 (diff) | |
download | cpython-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 'Python')
-rw-r--r-- | Python/ceval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 6435bd0..e54e344 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -4414,7 +4414,7 @@ special_lookup(PyThreadState *tstate, PyObject *o, _Py_Identifier *id) PyObject *res; res = _PyObject_LookupSpecial(o, id); if (res == NULL && !_PyErr_Occurred(tstate)) { - _PyErr_SetObject(tstate, PyExc_AttributeError, id->object); + _PyErr_SetObject(tstate, PyExc_AttributeError, _PyUnicode_FromId(id)); return NULL; } return res; |