summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-04-08 00:26:41 (GMT)
committerGitHub <noreply@github.com>2020-04-08 00:26:41 (GMT)
commit307b9d0144e719b016a47fcc43397c070615e01e (patch)
tree0158f91ba20b35a0c927a65c045c49ff7eeb0387 /Include
parenta15e260b708a98edaba86a2aa663c3f6b2abc964 (diff)
downloadcpython-307b9d0144e719b016a47fcc43397c070615e01e.zip
cpython-307b9d0144e719b016a47fcc43397c070615e01e.tar.gz
cpython-307b9d0144e719b016a47fcc43397c070615e01e.tar.bz2
bpo-40170: Remove PyIndex_Check() macro (GH-19428)
Always declare PyIndex_Check() as an opaque function to hide implementation details: remove PyIndex_Check() macro. The macro accessed directly the PyTypeObject.tp_as_number member.
Diffstat (limited to 'Include')
-rw-r--r--Include/cpython/abstract.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/Include/cpython/abstract.h b/Include/cpython/abstract.h
index 3f834ff..7bc8083 100644
--- a/Include/cpython/abstract.h
+++ b/Include/cpython/abstract.h
@@ -335,12 +335,6 @@ PyAPI_FUNC(void) PyBuffer_Release(Py_buffer *view);
(Py_TYPE(obj)->tp_iternext != NULL && \
Py_TYPE(obj)->tp_iternext != &_PyObject_NextNotImplemented)
-/* === Number Protocol ================================================== */
-
-#define PyIndex_Check(obj) \
- (Py_TYPE(obj)->tp_as_number != NULL && \
- Py_TYPE(obj)->tp_as_number->nb_index != NULL)
-
/* === Sequence protocol ================================================ */
/* Assume tp_as_sequence and sq_item exist and that 'i' does not