diff options
author | Inada Naoki <songofacandy@gmail.com> | 2023-06-02 01:12:40 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-02 01:12:40 (GMT) |
commit | 37498fc95012ba8e147db646b841bc3d36ddf4af (patch) | |
tree | cd71e0d73e0eb7e013f12862593b909cd739014d /Include | |
parent | ef300937c2a1b3ebe19c2835f3b46585825c1e1f (diff) | |
download | cpython-37498fc95012ba8e147db646b841bc3d36ddf4af.zip cpython-37498fc95012ba8e147db646b841bc3d36ddf4af.tar.gz cpython-37498fc95012ba8e147db646b841bc3d36ddf4af.tar.bz2 |
gh-85275: Remove old buffer APIs (#105137)
They are now abi-only.
Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Include')
-rw-r--r-- | Include/abstract.h | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/Include/abstract.h b/Include/abstract.h index b4c2bed..016ace9 100644 --- a/Include/abstract.h +++ b/Include/abstract.h @@ -320,55 +320,6 @@ PyAPI_FUNC(int) PyObject_DelItemString(PyObject *o, const char *key); PyAPI_FUNC(int) PyObject_DelItem(PyObject *o, PyObject *key); -/* === Old Buffer API ============================================ */ - -/* FIXME: usage of these should all be replaced in Python itself - but for backwards compatibility we will implement them. - Their usage without a corresponding "unlock" mechanism - may create issues (but they would already be there). */ - -/* Takes an arbitrary object which must support the (character, single segment) - buffer interface and returns a pointer to a read-only memory location - usable as character based input for subsequent processing. - - Return 0 on success. buffer and buffer_len are only set in case no error - occurs. Otherwise, -1 is returned and an exception set. */ -Py_DEPRECATED(3.0) -PyAPI_FUNC(int) PyObject_AsCharBuffer(PyObject *obj, - const char **buffer, - Py_ssize_t *buffer_len); - -/* Checks whether an arbitrary object supports the (character, single segment) - buffer interface. - - Returns 1 on success, 0 on failure. */ -Py_DEPRECATED(3.0) PyAPI_FUNC(int) PyObject_CheckReadBuffer(PyObject *obj); - -/* Same as PyObject_AsCharBuffer() except that this API expects (readable, - single segment) buffer interface and returns a pointer to a read-only memory - location which can contain arbitrary data. - - 0 is returned on success. buffer and buffer_len are only set in case no - error occurs. Otherwise, -1 is returned and an exception set. */ -Py_DEPRECATED(3.0) -PyAPI_FUNC(int) PyObject_AsReadBuffer(PyObject *obj, - const void **buffer, - Py_ssize_t *buffer_len); - -/* Takes an arbitrary object which must support the (writable, single segment) - buffer interface and returns a pointer to a writable memory location in - buffer of size 'buffer_len'. - - Return 0 on success. buffer and buffer_len are only set in case no error - occurs. Otherwise, -1 is returned and an exception set. */ -Py_DEPRECATED(3.0) -PyAPI_FUNC(int) PyObject_AsWriteBuffer(PyObject *obj, - void **buffer, - Py_ssize_t *buffer_len); - - -/* === New Buffer API ============================================ */ - /* Takes an arbitrary object and returns the result of calling obj.__format__(format_spec). */ PyAPI_FUNC(PyObject *) PyObject_Format(PyObject *obj, |