diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-11-04 19:54:05 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-11-04 19:54:05 (GMT) |
commit | e30c0a1014fb8f7978f608d6c7f430842f685075 (patch) | |
tree | 09eb1d83e739f2508f81e5ddc5739ddefa001957 /Include/unicodeobject.h | |
parent | 2fc507fe45e4e3cf4f332ff496a4aed9adf345d1 (diff) | |
download | cpython-e30c0a1014fb8f7978f608d6c7f430842f685075.zip cpython-e30c0a1014fb8f7978f608d6c7f430842f685075.tar.gz cpython-e30c0a1014fb8f7978f608d6c7f430842f685075.tar.bz2 |
Fix gdb/libpython.py for not ready Unicode strings
_PyUnicode_CheckConsistency() checks also hash and length value for not ready
Unicode strings.
Diffstat (limited to 'Include/unicodeobject.h')
-rw-r--r-- | Include/unicodeobject.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h index 8e29f34..58c1f55 100644 --- a/Include/unicodeobject.h +++ b/Include/unicodeobject.h @@ -231,22 +231,24 @@ typedef struct { * utf8_length = 0 if utf8 is NULL * wstr is shared with data and wstr_length=length if kind=PyUnicode_2BYTE_KIND and sizeof(wchar_t)=2 - or if kind=PyUnicode_4BYTE_KIND and sizeof(wchar_4)=4 + or if kind=PyUnicode_4BYTE_KIND and sizeof(wchar_t)=4 * wstr_length = 0 if wstr is NULL * (data starts just after the structure) - legacy string, not ready: * structure = PyUnicodeObject + * length = 0 (use wstr_length) + * hash = -1 * kind = PyUnicode_WCHAR_KIND * compact = 0 * ascii = 0 * ready = 0 + * interned = SSTATE_NOT_INTERNED * wstr is not NULL * data.any is NULL * utf8 is NULL * utf8_length = 0 - * interned = SSTATE_NOT_INTERNED - legacy string, ready: @@ -258,7 +260,7 @@ typedef struct { * data.any is not NULL * utf8 is shared and utf8_length = length with data.any if ascii = 1 * utf8_length = 0 if utf8 is NULL - * wstr is shared and wstr_length = length with data.any + * wstr is shared with data.any and wstr_length = length if kind=PyUnicode_2BYTE_KIND and sizeof(wchar_t)=2 or if kind=PyUnicode_4BYTE_KIND and sizeof(wchar_4)=4 * wstr_length = 0 if wstr is NULL |