mirror of
https://github.com/python/cpython.git
synced 2025-07-14 14:55:17 +00:00
[3.12] gh-109207: Fix SystemError when printing symtable entry object. (GH-109225) (#109227)
gh-109207: Fix SystemError when printing symtable entry object. (GH-109225)
(cherry picked from commit 4297499696
)
Co-authored-by: 云line <31395137+yunline@users.noreply.github.com>
This commit is contained in:
parent
1c223ae58d
commit
be8255ad8c
3 changed files with 7 additions and 3 deletions
|
@ -150,9 +150,8 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block,
|
|||
static PyObject *
|
||||
ste_repr(PySTEntryObject *ste)
|
||||
{
|
||||
return PyUnicode_FromFormat("<symtable entry %U(%ld), line %d>",
|
||||
ste->ste_name,
|
||||
PyLong_AS_LONG(ste->ste_id), ste->ste_lineno);
|
||||
return PyUnicode_FromFormat("<symtable entry %U(%R), line %d>",
|
||||
ste->ste_name, ste->ste_id, ste->ste_lineno);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue