longintrepr.pxd 480 B

12345678910111213141516
  1. # Internals of the "long" type (Python 2) or "int" type (Python 3).
  2. # This is not part of Python's published API.
  3. cdef extern from "longintrepr.h":
  4. # Add explicit cast to avoid compiler warnings
  5. cdef _PyLong_New "(PyObject*)_PyLong_New"(Py_ssize_t s)
  6. ctypedef unsigned int digit
  7. ctypedef int sdigit # Python >= 2.7 only
  8. ctypedef struct PyLongObject:
  9. digit* ob_digit
  10. cdef long PyLong_SHIFT
  11. cdef digit PyLong_BASE
  12. cdef digit PyLong_MASK