* 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>
--- /dev/null
+Fix the comparison of character and integer inside :func:`Tools.gdb.libpython.write_repr`. Patch by Yu Liu.
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])