diff options
Diffstat (limited to 'Include/stringobject.h')
-rw-r--r-- | Include/stringobject.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Include/stringobject.h b/Include/stringobject.h index 3deea8f..0c7e5b6 100644 --- a/Include/stringobject.h +++ b/Include/stringobject.h @@ -37,6 +37,15 @@ typedef struct { long ob_shash; int ob_sstate; char ob_sval[1]; + + /* Invariants: + * ob_sval contains space for 'ob_size+1' elements. + * ob_sval[ob_size] == 0. + * ob_shash is the hash of the string or -1 if not computed yet. + * ob_sstate != 0 iff the string object is in stringobject.c's + * 'interned' dictionary; in this case the two references + * from 'interned' to this object are *not counted* in ob_refcnt. + */ } PyStringObject; #define SSTATE_NOT_INTERNED 0 |