summaryrefslogtreecommitdiffstats
path: root/Include/abstract.h
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2019-05-28 15:16:33 (GMT)
committerVictor Stinner <vstinner@redhat.com>2019-05-28 15:16:33 (GMT)
commit3c8724fc60163f4f3c3b0d531c84cc7b36783f82 (patch)
treebb195253b921a259f0a6e02ffc80f4eb6ad16738 /Include/abstract.h
parent17a5588740b3d126d546ad1a13bdac4e028e6d50 (diff)
downloadcpython-3c8724fc60163f4f3c3b0d531c84cc7b36783f82.zip
cpython-3c8724fc60163f4f3c3b0d531c84cc7b36783f82.tar.gz
cpython-3c8724fc60163f4f3c3b0d531c84cc7b36783f82.tar.bz2
bpo-33407: Implement Py_DEPRECATED() on MSVC (GH-8980)
Diffstat (limited to 'Include/abstract.h')
-rw-r--r--Include/abstract.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/Include/abstract.h b/Include/abstract.h
index 79002a7..c226aab 100644
--- a/Include/abstract.h
+++ b/Include/abstract.h
@@ -316,17 +316,16 @@ PyAPI_FUNC(int) PyObject_DelItem(PyObject *o, PyObject *key);
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)
- Py_DEPRECATED(3.0);
+ Py_ssize_t *buffer_len);
/* Checks whether an arbitrary object supports the (character, single segment)
buffer interface.
Returns 1 on success, 0 on failure. */
-PyAPI_FUNC(int) PyObject_CheckReadBuffer(PyObject *obj)
- Py_DEPRECATED(3.0);
+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
@@ -334,10 +333,10 @@ PyAPI_FUNC(int) PyObject_CheckReadBuffer(PyObject *obj)
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)
- Py_DEPRECATED(3.0);
+ 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
@@ -345,10 +344,10 @@ PyAPI_FUNC(int) PyObject_AsReadBuffer(PyObject *obj,
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)
- Py_DEPRECATED(3.0);
+ Py_ssize_t *buffer_len);
/* === New Buffer API ============================================ */