[Python-checkins] CVS: python/dist/src/Include longintrepr.h,2.12,2.13
Tim Peters
tim_one@users.sourceforge.net
Fri, 01 Mar 2002 20:33:11 -0800
Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv12140/python/Include
Modified Files:
longintrepr.h
Log Message:
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.
Index: longintrepr.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/longintrepr.h,v
retrieving revision 2.12
retrieving revision 2.13
diff -C2 -d -r2.12 -r2.13
*** longintrepr.h 10 Sep 2001 20:52:47 -0000 2.12
--- longintrepr.h 2 Mar 2002 04:33:09 -0000 2.13
***************
*** 37,45 ****
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. */
struct _longobject {
! PyObject_HEAD
! int ob_size;
digit ob_digit[1];
};
--- 37,48 ----
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.
!
! CAUTION: Generic code manipulating subtypes of PyVarObject has to
! aware that longs abuse ob_size's sign bit.
! */
struct _longobject {
! PyObject_VAR_HEAD
digit ob_digit[1];
};