diff --git a/docs/release.rst b/docs/release.rst index f7a8e17d..bda2f867 100644 --- a/docs/release.rst +++ b/docs/release.rst @@ -35,6 +35,9 @@ Fixes * Update ``license*`` metadata and include third-party licenses. By :user:`John Kirkham `, :issue:`729` +* Add ``#ifndef`` guard around ``PyBytes_RESIZE``. + By :user:`John Kirkham `, :issue:`732` + 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