/opt/alt/python27/include/python2.7
NameSizeModeActions
abstract.h452250644editdlrm
asdl.h10990644editdlrm
ast.h2300644editdlrm
bitset.h7920644editdlrm
boolobject.h9120644editdlrm
bufferobject.h9220644editdlrm
bytearrayobject.h19410644editdlrm
bytesobject.h11520644editdlrm
bytes_methods.h28040644editdlrm
cellobject.h6510644editdlrm
ceval.h50610644editdlrm
classobject.h30020644editdlrm
cobject.h29300644editdlrm
code.h44070644editdlrm
codecs.h61710644editdlrm
compile.h10650644editdlrm
complexobject.h18530644editdlrm
cStringIO.h20050644editdlrm
datetime.h83130644editdlrm
descrobject.h24800644editdlrm
dictobject.h68920644editdlrm
dtoa.h3380644editdlrm
enumobject.h2530644editdlrm
errcode.h13990644editdlrm
eval.h5570644editdlrm
fileobject.h36620644editdlrm
floatobject.h56250644editdlrm
frameobject.h32540644editdlrm
funcobject.h29950644editdlrm
genobject.h8910644editdlrm
graminit.h19170644editdlrm
grammar.h20510644editdlrm
import.h22230644editdlrm
intobject.h29760644editdlrm
intrcheck.h2740644editdlrm
iterobject.h5220644editdlrm
listobject.h25690644editdlrm
longintrepr.h39070644editdlrm
longobject.h58090644editdlrm
marshal.h7130644editdlrm
memoryobject.h28230644editdlrm
metagrammar.h2530644editdlrm
methodobject.h33550644editdlrm
modsupport.h50240644editdlrm
moduleobject.h6090644editdlrm
node.h9380644editdlrm
object.h400590644editdlrm
objimpl.h143380644editdlrm
opcode.h48140644editdlrm
osdefs.h10590644editdlrm
parsetok.h17800644editdlrm
patchlevel.h14500644editdlrm
pgen.h2530644editdlrm
pgenheaders.h11800644editdlrm
pyarena.h26930644editdlrm
pycapsule.h16790644editdlrm
pyconfig-64.h378410644editdlrm
pyconfig.h1620644editdlrm
pyctype.h12680644editdlrm
pydebug.h13220644editdlrm
pyerrors.h117410644editdlrm
pyexpat.h21170644editdlrm
pyfpe.h84710644editdlrm
pygetopt.h3480644editdlrm
pymacconfig.h29890644editdlrm
pymactoolbox.h86280644editdlrm
pymath.h73320644editdlrm
pymem.h47120644editdlrm
pyport.h325580644editdlrm
pystate.h64030644editdlrm
pystrcmp.h4630644editdlrm
pystrtod.h15820644editdlrm
Python-ast.h211130644editdlrm
Python.h43750644editdlrm
pythonrun.h72340644editdlrm
pythread.h11550644editdlrm
py_curses.h42730644editdlrm
rangeobject.h6460644editdlrm
setobject.h30770644editdlrm
sliceobject.h16810644editdlrm
stringobject.h79790644editdlrm
structmember.h29010644editdlrm
structseq.h8620644editdlrm
symtable.h37240644editdlrm
sysmodule.h8650644editdlrm
timefuncs.h5410644editdlrm
token.h17990644editdlrm
traceback.h6970644editdlrm
tupleobject.h21750644editdlrm
ucnhash.h9240644editdlrm
unicodeobject.h522270644editdlrm
warnings.h6350644editdlrm
weakrefobject.h28010644editdlrm
Edit: /opt/alt/python27/include/python2.7/longintrepr.h (3907B)
#ifndef Py_LONGINTREPR_H #define Py_LONGINTREPR_H #ifdef __cplusplus extern "C" { #endif /* This is published for the benefit of "friend" marshal.c only. */ /* Parameters of the long integer representation. There are two different sets of parameters: one set for 30-bit digits, stored in an unsigned 32-bit integer type, and one set for 15-bit digits with each digit stored in an unsigned short. The value of PYLONG_BITS_IN_DIGIT, defined either at configure time or in pyport.h, is used to decide which digit size to use. Type 'digit' should be able to hold 2*PyLong_BASE-1, and type 'twodigits' should be an unsigned integer type able to hold all integers up to PyLong_BASE*PyLong_BASE-1. x_sub assumes that 'digit' is an unsigned type, and that overflow is handled by taking the result modulo 2**N for some N > PyLong_SHIFT. The majority of the code doesn't care about the precise value of PyLong_SHIFT, but there are some notable exceptions: - long_pow() requires that PyLong_SHIFT be divisible by 5 - PyLong_{As,From}ByteArray require that PyLong_SHIFT be at least 8 - long_hash() requires that PyLong_SHIFT is *strictly* less than the number of bits in an unsigned long, as do the PyLong <-> long (or unsigned long) conversion functions - the long <-> size_t/Py_ssize_t conversion functions expect that PyLong_SHIFT is strictly less than the number of bits in a size_t - the marshal code currently expects that PyLong_SHIFT is a multiple of 15 The values 15 and 30 should fit all of the above requirements, on any platform. */ #if PYLONG_BITS_IN_DIGIT == 30 #if !(defined HAVE_UINT64_T && defined HAVE_UINT32_T && \ defined HAVE_INT64_T && defined HAVE_INT32_T) #error "30-bit long digits requested, but the necessary types are not available on this platform" #endif typedef PY_UINT32_T digit; typedef PY_INT32_T sdigit; /* signed variant of digit */ typedef PY_UINT64_T twodigits; typedef PY_INT64_T stwodigits; /* signed variant of twodigits */ #define PyLong_SHIFT 30 #define _PyLong_DECIMAL_SHIFT 9 /* max(e such that 10**e fits in a digit) */ #define _PyLong_DECIMAL_BASE ((digit)1000000000) /* 10 ** DECIMAL_SHIFT */ #elif PYLONG_BITS_IN_DIGIT == 15 typedef unsigned short digit; typedef short sdigit; /* signed variant of digit */ typedef unsigned long twodigits; typedef long stwodigits; /* signed variant of twodigits */ #define PyLong_SHIFT 15 #define _PyLong_DECIMAL_SHIFT 4 /* max(e such that 10**e fits in a digit) */ #define _PyLong_DECIMAL_BASE ((digit)10000) /* 10 ** DECIMAL_SHIFT */ #else #error "PYLONG_BITS_IN_DIGIT should be 15 or 30" #endif #define PyLong_BASE ((digit)1 << PyLong_SHIFT) #define PyLong_MASK ((digit)(PyLong_BASE - 1)) /* b/w compatibility with Python 2.5 */ #define SHIFT PyLong_SHIFT #define BASE PyLong_BASE #define MASK PyLong_MASK #if PyLong_SHIFT % 5 != 0 #error "longobject.c requires that PyLong_SHIFT be divisible by 5" #endif /* Long integer representation. The absolute value of a number is equal to SUM(for i=0 through abs(ob_size)-1) ob_digit[i] * 2**(SHIFT*i) Negative numbers are represented with ob_size < 0; zero is represented by ob_size == 0. In a normalized number, ob_digit[abs(ob_size)-1] (the most significant 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. 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]; }; PyAPI_FUNC(PyLongObject *) _PyLong_New(Py_ssize_t); /* Return a copy of src. */ PyAPI_FUNC(PyObject *) _PyLong_Copy(PyLongObject *src); #ifdef __cplusplus } #endif #endif /* !Py_LONGINTREPR_H */