diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-10-02 14:55:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-02 14:55:41 (GMT) |
commit | be8255ad8c3af2ccd452cfdfae10bd72e966cb25 (patch) | |
tree | 2510199d956871d3b0a4b9eee91a8850c2a07ef3 /Python | |
parent | 1c223ae58db4338c3376d3d8a832671b16057799 (diff) | |
download | cpython-be8255ad8c3af2ccd452cfdfae10bd72e966cb25.zip cpython-be8255ad8c3af2ccd452cfdfae10bd72e966cb25.tar.gz cpython-be8255ad8c3af2ccd452cfdfae10bd72e966cb25.tar.bz2 |
[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 429749969621b149c1a7c3c004bd44f52bec8f44)
Co-authored-by: δΊ‘line <31395137+yunline@users.noreply.github.com>
Diffstat (limited to 'Python')
-rw-r--r-- | Python/symtable.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/symtable.c b/Python/symtable.c index 8651812..70b6eac 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 |