diff options
author | Inada Naoki <songofacandy@gmail.com> | 2020-06-25 23:07:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-25 23:07:22 (GMT) |
commit | 6f8a6ee59cb7f99f68df8ee9c3e8c8cf19af3eed (patch) | |
tree | b5e8c8e1c6f671b1f39078d0a7dbce48fe307f25 /Include | |
parent | 77ed29b2c2742b694cac6db5976afc31b58e4803 (diff) | |
download | cpython-6f8a6ee59cb7f99f68df8ee9c3e8c8cf19af3eed.zip cpython-6f8a6ee59cb7f99f68df8ee9c3e8c8cf19af3eed.tar.gz cpython-6f8a6ee59cb7f99f68df8ee9c3e8c8cf19af3eed.tar.bz2 |
bpo-41103: Remove old buffer protocol support (#21117)
They are deprecated since Python 3.0.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/abstract.h | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/Include/abstract.h b/Include/abstract.h index bb51c66..a23b7dc 100644 --- a/Include/abstract.h +++ b/Include/abstract.h @@ -309,53 +309,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 - useable 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 |