diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-03-02 04:33:09 +0000 |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-03-02 04:33:09 +0000 |
commit | ea482ac9affa75d433d3b076131d41a53554b506 (patch) | |
tree | 996619d3f0465bce576809f29e75e79f253ae570 /Include/longintrepr.h | |
parent | 03d69c5e55893a3c64c8d3a2269f497cb9f35e27 (diff) | |
download | cpython-ea482ac9affa75d433d3b076131d41a53554b506.tar.gz |
For clarity, change _longobject to build directly from PyObject_VAR_HEAD
instead of faking it by hand. It *is* a var object, and nothing but
hysterical raisins to pretend it's an oddball.
Diffstat (limited to 'Include/longintrepr.h')
-rw-r--r-- | Include/longintrepr.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Include/longintrepr.h b/Include/longintrepr.h index 89ba5867e0..abf8640684 100644 --- a/Include/longintrepr.h +++ b/Include/longintrepr.h @@ -36,11 +36,14 @@ typedef BASE_TWODIGITS_TYPE stwodigits; /* signed variant of twodigits */ digit) is never zero. Also, in all cases, for all valid i, 0 <= ob_digit[i] <= MASK. The allocation function takes care of allocating extra memory - so that ob_digit[0] ... ob_digit[abs(ob_size)-1] are actually available. */ + so that ob_digit[0] ... ob_digit[abs(ob_size)-1] are actually available. + + CAUTION: Generic code manipulating subtypes of PyVarObject has to + aware that longs abuse ob_size's sign bit. +*/ struct _longobject { - PyObject_HEAD - int ob_size; + PyObject_VAR_HEAD digit ob_digit[1]; }; |