Commit 0f7bd0d1 authored by Thomas A Caswell's avatar Thomas A Caswell Committed by Stefan Behnel

Change C includes of "longintrepr.h" to account for upstream changes (GH-4428)

See https://github.com/python/cpython/pull/28968/8e5de40f90476249e9a2e5ef135143b5c6a0b512
which is part of implementing
https://bugs.python.org/issue35134
moved the header "longintrepr.h" into a sub-folder.
The notes on this change suggested to include "Python.h" instead.
parent f53ac52d
# 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
......
......@@ -200,7 +200,9 @@
#endif
#if CYTHON_USE_PYLONG_INTERNALS
#if PY_MAJOR_VERSION < 3
#include "longintrepr.h"
#endif
/* These short defines can easily conflict with other code */
#undef SHIFT
#undef BASE
......
......@@ -8,7 +8,12 @@ cdef extern from "Python.h":
Py_ssize_t ob_refcnt
PyTypeObject *ob_type
cdef extern from "longintrepr.h":
cdef extern from "Python.h":
"""
#if PY_MAJOR_VERSION < 3
#include "longintrepr.h"
#endif
"""
cdef struct _longobject:
int ob_refcnt
PyTypeObject *ob_type
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment