diff options
author | David Hewitt <1939362+davidhewitt@users.noreply.github.com> | 2021-12-22 13:07:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-22 13:07:46 (GMT) |
commit | 31ff96712e8f89ac1056c2da880b44650002219f (patch) | |
tree | f6cbc0c62bb78c3251a2ff7364fba22b6b36007a /Include | |
parent | fc54e722a2e66971f1a8e16cff24c844bf9c5ac4 (diff) | |
download | cpython-31ff96712e8f89ac1056c2da880b44650002219f.zip cpython-31ff96712e8f89ac1056c2da880b44650002219f.tar.gz cpython-31ff96712e8f89ac1056c2da880b44650002219f.tar.bz2 |
bpo-46140: take more Py_buffer arguments as const * (GH-30217)
Diffstat (limited to 'Include')
-rw-r--r-- | Include/cpython/abstract.h | 6 | ||||
-rw-r--r-- | Include/memoryobject.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Include/cpython/abstract.h b/Include/cpython/abstract.h index 55a742c..2876a7b 100644 --- a/Include/cpython/abstract.h +++ b/Include/cpython/abstract.h @@ -183,17 +183,17 @@ PyAPI_FUNC(int) PyObject_GetBuffer(PyObject *obj, Py_buffer *view, /* Get the memory area pointed to by the indices for the buffer given. Note that view->ndim is the assumed size of indices. */ -PyAPI_FUNC(void *) PyBuffer_GetPointer(Py_buffer *view, Py_ssize_t *indices); +PyAPI_FUNC(void *) PyBuffer_GetPointer(const Py_buffer *view, const Py_ssize_t *indices); /* Return the implied itemsize of the data-format area from a struct-style description. */ PyAPI_FUNC(Py_ssize_t) PyBuffer_SizeFromFormat(const char *format); /* Implementation in memoryobject.c */ -PyAPI_FUNC(int) PyBuffer_ToContiguous(void *buf, Py_buffer *view, +PyAPI_FUNC(int) PyBuffer_ToContiguous(void *buf, const Py_buffer *view, Py_ssize_t len, char order); -PyAPI_FUNC(int) PyBuffer_FromContiguous(Py_buffer *view, void *buf, +PyAPI_FUNC(int) PyBuffer_FromContiguous(const Py_buffer *view, const void *buf, Py_ssize_t len, char order); /* Copy len bytes of data from the contiguous chunk of memory diff --git a/Include/memoryobject.h b/Include/memoryobject.h index 306028f..0298cc9 100644 --- a/Include/memoryobject.h +++ b/Include/memoryobject.h @@ -26,7 +26,7 @@ PyAPI_FUNC(PyObject *) PyMemoryView_FromMemory(char *mem, Py_ssize_t size, int flags); #endif #ifndef Py_LIMITED_API -PyAPI_FUNC(PyObject *) PyMemoryView_FromBuffer(Py_buffer *info); +PyAPI_FUNC(PyObject *) PyMemoryView_FromBuffer(const Py_buffer *info); #endif PyAPI_FUNC(PyObject *) PyMemoryView_GetContiguous(PyObject *base, int buffertype, |