summaryrefslogtreecommitdiffstats
path: root/Python/symtable.c
diff options
context:
space:
mode:
authorδΊ‘line <31395137+yunline@users.noreply.github.com>2023-09-10 12:04:24 (GMT)
committerGitHub <noreply@github.com>2023-09-10 12:04:24 (GMT)
commit429749969621b149c1a7c3c004bd44f52bec8f44 (patch)
tree7d3b50af8d629ab0bc15763f1800b44ec7432319 /Python/symtable.c
parent2dd6a86c4ee604b331ed739c2508b0d0114993c6 (diff)
downloadcpython-429749969621b149c1a7c3c004bd44f52bec8f44.zip
cpython-429749969621b149c1a7c3c004bd44f52bec8f44.tar.gz
cpython-429749969621b149c1a7c3c004bd44f52bec8f44.tar.bz2
gh-109207: Fix SystemError when printing symtable entry object. (GH-109225)
Diffstat (limited to 'Python/symtable.c')
-rw-r--r--Python/symtable.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index 7eef6f7..6c28b49 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -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