summaryrefslogtreecommitdiff
path: root/Cython/Includes/cpython/longintrepr.pxd
diff options
context:
space:
mode:
Diffstat (limited to 'Cython/Includes/cpython/longintrepr.pxd')
-rw-r--r--Cython/Includes/cpython/longintrepr.pxd8
1 files changed, 6 insertions, 2 deletions
diff --git a/Cython/Includes/cpython/longintrepr.pxd b/Cython/Includes/cpython/longintrepr.pxd
index 45fe81e6c..c38c1bff8 100644
--- a/Cython/Includes/cpython/longintrepr.pxd
+++ b/Cython/Includes/cpython/longintrepr.pxd
@@ -1,7 +1,11 @@
# Internals of the "long" type (Python 2) or "int" type (Python 3).
-# This is not part of Python's published API.
-cdef extern from "longintrepr.h":
+cdef extern from "Python.h":
+ """
+ #if PY_MAJOR_VERSION < 3
+ #include "longintrepr.h"
+ #endif
+ """
ctypedef unsigned int digit
ctypedef int sdigit # Python >= 2.7 only