PyUnicode_Ready() now sets ascii=1 if maxchar < 128
ascii=1 is no more reserved to PyASCIIObject. Use
PyUnicode_IS_COMPACT_ASCII(obj) to check if obj is a PyASCIIObject (as before).
diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py
index b5183d4..4b42c8b 100644
--- a/Tools/gdb/libpython.py
+++ b/Tools/gdb/libpython.py
@@ -1132,15 +1132,16 @@
compact = self.field('_base')
ascii = compact['_base']
state = ascii['state']
+ is_compact_ascii = (int(state['ascii']) and int(state['compact']))
field_length = long(ascii['length'])
if not int(state['ready']):
# string is not ready
may_have_surrogates = True
field_str = ascii['wstr']
- if not int(state['ascii']):
+ if not is_compact_ascii:
field_length = compact('wstr_length')
else:
- if int(state['ascii']):
+ if is_compact_ascii:
field_str = ascii.address + 1
elif int(state['compact']):
field_str = compact.address + 1