From e30c0a1014fb8f7978f608d6c7f430842f685075 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 4 Nov 2011 20:54:05 +0100 Subject: Fix gdb/libpython.py for not ready Unicode strings _PyUnicode_CheckConsistency() checks also hash and length value for not ready Unicode strings. --- Tools/gdb/libpython.py | 5 ----- 1 file changed, 5 deletions(-) (limited to 'Tools/gdb/libpython.py') diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py index 43a0f20ec1..3fea68f8e3 100644 --- a/Tools/gdb/libpython.py +++ b/Tools/gdb/libpython.py @@ -1123,9 +1123,6 @@ class PyUnicodeObjectPtr(PyObjectPtr): 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 @@ class PyUnicodeObjectPtr(PyObjectPtr): # 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 -- cgit v1.2.1