Mercurial > cpython-lru_cache-weakref
diff Tools/gdb/libpython.py @ 73368:694f70ea1419
Oops, really fix gdb/libpython.py for not ready Unicode strings
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Fri, 04 Nov 2011 22:34:01 +0100 |
| parents | b3543ef9b445 |
| children | 50c7ac2fe13c |
line wrap: on
line diff
--- a/Tools/gdb/libpython.py Fri Nov 04 22:29:24 2011 +0100 +++ b/Tools/gdb/libpython.py Fri Nov 04 22:34:01 2011 +0100 @@ -1130,12 +1130,13 @@ 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 + field_length = long(compact['wstr_length']) may_have_surrogates = True field_str = ascii['wstr'] else: + field_length = long(ascii['length']) if is_compact_ascii: field_str = ascii.address + 1 elif int(state['compact']):
