diff options
Diffstat (limited to 'Include')
-rw-r--r-- | Include/cpython/abstract.h | 2 | ||||
-rw-r--r-- | Include/internal/pycore_object.h | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/Include/cpython/abstract.h b/Include/cpython/abstract.h index 1083942..7a4219c 100644 --- a/Include/cpython/abstract.h +++ b/Include/cpython/abstract.h @@ -376,4 +376,4 @@ PyAPI_FUNC(void) _Py_add_one_to_index_C(int nd, Py_ssize_t *index, PyAPI_FUNC(int) _Py_convert_optional_to_ssize_t(PyObject *, void *); /* Same as PyNumber_Index but can return an instance of a subclass of int. */ -PyAPI_FUNC(PyObject *) _PyNumber_Index(PyObject *o);
\ No newline at end of file +PyAPI_FUNC(PyObject *) _PyNumber_Index(PyObject *o); diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h index 3975765..3cd27b0 100644 --- a/Include/internal/pycore_object.h +++ b/Include/internal/pycore_object.h @@ -168,6 +168,12 @@ _PyObject_IS_GC(PyObject *obj) // Fast inlined version of PyType_IS_GC() #define _PyType_IS_GC(t) _PyType_HasFeature((t), Py_TPFLAGS_HAVE_GC) +// Usage: assert(_Py_CheckSlotResult(obj, "__getitem__", result != NULL))); +extern int _Py_CheckSlotResult( + PyObject *obj, + const char *slot_name, + int success); + #ifdef __cplusplus } #endif |