diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-04-16 07:59:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-16 07:59:32 -0700 |
commit | 84c279b514141f608cf480905c87d48998e296d1 (patch) | |
tree | c2c2ac2e6897ed5bacc7703ed73288f5d6d97f78 /Tools | |
parent | gh-82849: revise intro to os.path.rst (GH-32232) (diff) | |
download | cpython-84c279b514141f608cf480905c87d48998e296d1.tar.gz cpython-84c279b514141f608cf480905c87d48998e296d1.tar.bz2 cpython-84c279b514141f608cf480905c87d48998e296d1.zip |
gh-91595: fix the comparison of character and integer by using ord() (GH-91596)
* fix the comparison of character and integer by using ord()
* 📜🤖 Added by blurb_it.
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 9300b6d72948b94c0924a75ea14c6298156522d0)
Co-authored-by: Yu Liu <yuki.liu@utexas.edu>
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/gdb/libpython.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py index 270aeb426eb..12b519330d8 100755 --- a/Tools/gdb/libpython.py +++ b/Tools/gdb/libpython.py @@ -1291,7 +1291,7 @@ class PyUnicodeObjectPtr(PyObjectPtr): out.write('\\r') # Map non-printable US ASCII to '\xhh' */ - elif ch < ' ' or ch == 0x7F: + elif ch < ' ' or ord(ch) == 0x7F: out.write('\\x') out.write(hexdigits[(ord(ch) >> 4) & 0x000F]) out.write(hexdigits[ord(ch) & 0x000F]) |