1 #ifndef Py_INTERNAL_ABSTRACT_H
2 #define Py_INTERNAL_ABSTRACT_H
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6 
7 #ifndef Py_BUILD_CORE
8 #  error "this header requires Py_BUILD_CORE define"
9 #endif
10 
11 // Fast inlined version of PyIndex_Check()
12 static inline int
_PyIndex_Check(PyObject *obj)13 _PyIndex_Check(PyObject *obj)
14 {
15     PyNumberMethods *tp_as_number = Py_TYPE(obj)->tp_as_number;
16     return (tp_as_number != NULL && tp_as_number->nb_index != NULL);
17 }
18 
19 PyObject *_PyNumber_PowerNoMod(PyObject *lhs, PyObject *rhs);
20 PyObject *_PyNumber_InPlacePowerNoMod(PyObject *lhs, PyObject *rhs);
21 
22 #ifdef __cplusplus
23 }
24 #endif
25 #endif /* !Py_INTERNAL_ABSTRACT_H */
26