diff options
Diffstat (limited to 'Include/cpython')
-rw-r--r-- | Include/cpython/abstract.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Include/cpython/abstract.h b/Include/cpython/abstract.h index c9a8a07..e9a2319 100644 --- a/Include/cpython/abstract.h +++ b/Include/cpython/abstract.h @@ -156,6 +156,13 @@ PyAPI_FUNC(PyObject *) _PyObject_VectorcallMethod( PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames); +static inline PyObject * +_PyObject_CallMethodNoArgs(PyObject *self, PyObject *name) +{ + return _PyObject_VectorcallMethod(name, &self, + 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +} + /* Like PyObject_CallMethod(), but expect a _Py_Identifier* as the method name. */ PyAPI_FUNC(PyObject *) _PyObject_CallMethodId(PyObject *obj, @@ -184,6 +191,13 @@ _PyObject_VectorcallMethodId( return _PyObject_VectorcallMethod(oname, args, nargsf, kwnames); } +static inline PyObject * +_PyObject_CallMethodIdNoArgs(PyObject *self, _Py_Identifier *name) +{ + return _PyObject_VectorcallMethodId(name, &self, + 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); +} + PyAPI_FUNC(int) _PyObject_HasLen(PyObject *o); /* Guess the size of object 'o' using len(o) or o.__length_hint__(). |