longintrepr.pxd 480 B

12345678910111213141516171819
  1. # Internals of the "long" type (Python 2) or "int" type (Python 3).
  2. cdef extern from "Python.h":
  3. """
  4. #if PY_MAJOR_VERSION < 3
  5. #include "longintrepr.h"
  6. #endif
  7. """
  8. ctypedef unsigned int digit
  9. ctypedef int sdigit # Python >= 2.7 only
  10. ctypedef class __builtin__.py_long [object PyLongObject]:
  11. cdef digit* ob_digit
  12. cdef py_long _PyLong_New(Py_ssize_t s)
  13. cdef long PyLong_SHIFT
  14. cdef digit PyLong_BASE
  15. cdef digit PyLong_MASK