diff --git a/docs/release.rst b/docs/release.rst index 018f1658..12b186ed 100644 --- a/docs/release.rst +++ b/docs/release.rst @@ -32,6 +32,9 @@ Fixes * Fix ``const`` discard warnings in ``fletcher32``. By :user:`John Kirkham `, :issue:`728` +* Add ``#ifdef`` guard around ``PyBytes_RESIZE``. + By :user:`John Kirkham `, :issue:`731` + Maintenance ~~~~~~~~~~~ diff --git a/numcodecs/compat_ext.pxd b/numcodecs/compat_ext.pxd index 436c23fb..129c1d86 100644 --- a/numcodecs/compat_ext.pxd +++ b/numcodecs/compat_ext.pxd @@ -3,7 +3,9 @@ cdef extern from *: """ + #ifndef PyBytes_RESIZE #define PyBytes_RESIZE(b, n) _PyBytes_Resize(&b, n) + #endif """ int PyBytes_RESIZE(object b, Py_ssize_t n) except -1