File indexing completed on 2025-11-19 09:50:40
0001 #ifndef Py_CPYTHON_ABSTRACTOBJECT_H
0002 # error "this header file must not be included directly"
0003 #endif
0004
0005
0006
0007
0008
0009 PyAPI_FUNC(PyObject*) _PyObject_CallMethodId(
0010 PyObject *obj,
0011 _Py_Identifier *name,
0012 const char *format, ...);
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 PyAPI_FUNC(PyObject*) _PyStack_AsDict(PyObject *const *values, PyObject *kwnames);
0025
0026
0027
0028
0029
0030
0031
0032 static inline Py_ssize_t
0033 _PyVectorcall_NARGS(size_t n)
0034 {
0035 return n & ~PY_VECTORCALL_ARGUMENTS_OFFSET;
0036 }
0037 #define PyVectorcall_NARGS(n) _PyVectorcall_NARGS(n)
0038
0039 PyAPI_FUNC(vectorcallfunc) PyVectorcall_Function(PyObject *callable);
0040
0041
0042
0043 #define _PyObject_Vectorcall PyObject_Vectorcall
0044 #define _PyObject_VectorcallMethod PyObject_VectorcallMethod
0045 #define _PyObject_FastCallDict PyObject_VectorcallDict
0046 #define _PyVectorcall_Function PyVectorcall_Function
0047 #define _PyObject_CallOneArg PyObject_CallOneArg
0048 #define _PyObject_CallMethodNoArgs PyObject_CallMethodNoArgs
0049 #define _PyObject_CallMethodOneArg PyObject_CallMethodOneArg
0050
0051
0052
0053 PyAPI_FUNC(PyObject *) PyObject_VectorcallDict(
0054 PyObject *callable,
0055 PyObject *const *args,
0056 size_t nargsf,
0057 PyObject *kwargs);
0058
0059 PyAPI_FUNC(PyObject *) PyObject_CallOneArg(PyObject *func, PyObject *arg);
0060
0061 static inline PyObject *
0062 PyObject_CallMethodNoArgs(PyObject *self, PyObject *name)
0063 {
0064 size_t nargsf = 1 | PY_VECTORCALL_ARGUMENTS_OFFSET;
0065 return PyObject_VectorcallMethod(name, &self, nargsf, _Py_NULL);
0066 }
0067
0068 static inline PyObject *
0069 PyObject_CallMethodOneArg(PyObject *self, PyObject *name, PyObject *arg)
0070 {
0071 PyObject *args[2] = {self, arg};
0072 size_t nargsf = 2 | PY_VECTORCALL_ARGUMENTS_OFFSET;
0073 assert(arg != NULL);
0074 return PyObject_VectorcallMethod(name, args, nargsf, _Py_NULL);
0075 }
0076
0077
0078
0079
0080 PyAPI_FUNC(Py_ssize_t) PyObject_LengthHint(PyObject *o, Py_ssize_t);
0081
0082
0083
0084
0085
0086 #define PySequence_ITEM(o, i)\
0087 ( Py_TYPE(o)->tp_as_sequence->sq_item((o), (i)) )