File tree Expand file tree Collapse file tree 4 files changed +10
-24
lines changed Expand file tree Collapse file tree 4 files changed +10
-24
lines changed Original file line number Diff line number Diff line change @@ -15,19 +15,12 @@ from cpython.bytes cimport (
1515)
1616from cpython.memoryview cimport PyMemoryView_GET_BUFFER
1717
18- from .compat_ext cimport ensure_continguous_memoryview
18+ from .compat_ext cimport PyBytes_RESIZE, ensure_continguous_memoryview
1919
2020from .compat import ensure_contiguous_ndarray
2121from .abc import Codec
2222
2323
24- cdef extern from * :
25- """
26- #define PyBytes_RESIZE(b, n) _PyBytes_Resize(&b, n)
27- """
28- int PyBytes_RESIZE(object b, Py_ssize_t n) except - 1
29-
30-
3124cdef extern from " blosc.h" :
3225 cdef enum :
3326 BLOSC_MAX_OVERHEAD,
Original file line number Diff line number Diff line change 11# cython: language_level=3
22
33
4+ cdef extern from * :
5+ """
6+ #define PyBytes_RESIZE(b, n) _PyBytes_Resize(&b, n)
7+ """
8+ int PyBytes_RESIZE(object b, Py_ssize_t n) except - 1
9+
10+
411cpdef memoryview ensure_continguous_memoryview(obj)
Original file line number Diff line number Diff line change @@ -13,20 +13,13 @@ from cpython.bytes cimport (
1313)
1414from cpython.memoryview cimport PyMemoryView_GET_BUFFER
1515
16- from .compat_ext cimport ensure_continguous_memoryview
16+ from .compat_ext cimport PyBytes_RESIZE, ensure_continguous_memoryview
1717from ._utils cimport store_le32, load_le32
1818
1919from .compat import ensure_contiguous_ndarray
2020from .abc import Codec
2121
2222
23- cdef extern from * :
24- """
25- #define PyBytes_RESIZE(b, n) _PyBytes_Resize(&b, n)
26- """
27- int PyBytes_RESIZE(object b, Py_ssize_t n) except - 1
28-
29-
3023cdef extern from " lz4.h" :
3124
3225 const char * LZ4_versionString() nogil
Original file line number Diff line number Diff line change @@ -11,19 +11,12 @@ from cpython.bytes cimport (
1111)
1212from cpython.memoryview cimport PyMemoryView_GET_BUFFER
1313
14- from .compat_ext cimport ensure_continguous_memoryview
14+ from .compat_ext cimport PyBytes_RESIZE, ensure_continguous_memoryview
1515
1616from .compat import ensure_contiguous_ndarray
1717from .abc import Codec
1818
1919
20- cdef extern from * :
21- """
22- #define PyBytes_RESIZE(b, n) _PyBytes_Resize(&b, n)
23- """
24- int PyBytes_RESIZE(object b, Py_ssize_t n) except - 1
25-
26-
2720cdef extern from " zstd.h" :
2821
2922 unsigned ZSTD_versionNumber() nogil
You can’t perform that action at this time.
0 commit comments