Mercurial > cpython-lru_cache-weakref
diff Tools/gdb/libpython.py @ 73356:b3543ef9b445
Fix gdb/libpython.py for not ready Unicode strings
_PyUnicode_CheckConsistency() checks also hash and length value for not ready
Unicode strings.
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Fri, 04 Nov 2011 20:54:05 +0100 |
| parents | ef1f0434c79c |
| children | 694f70ea1419 |
line wrap: on
line diff
--- a/Tools/gdb/libpython.py Fri Nov 04 20:06:39 2011 +0100 +++ b/Tools/gdb/libpython.py Fri Nov 04 20:54:05 2011 +0100 @@ -1123,9 +1123,6 @@ return _type_Py_UNICODE.sizeof def proxyval(self, visited): - # From unicodeobject.h: - # Py_ssize_t length; /* Length of raw Unicode data in buffer */ - # Py_UNICODE *str; /* Raw Unicode buffer */ if _is_pep393: # Python 3.3 and newer may_have_surrogates = False @@ -1138,8 +1135,6 @@ # string is not ready may_have_surrogates = True field_str = ascii['wstr'] - if not is_compact_ascii: - field_length = compact('wstr_length') else: if is_compact_ascii: field_str = ascii.address + 1
