4 #ifndef Py_METHODOBJECT_H
5 #define Py_METHODOBJECT_H
16 #define PyCFunction_Check(op) (Py_TYPE(op) == &PyCFunction_Type)
19 typedef PyObject *(*PyCFunctionWithKeywords)(PyObject *, PyObject *,
21 typedef PyObject *(*PyNoArgsFunction)(PyObject *);
24 PyAPI_FUNC(PyObject *) PyCFunction_GetSelf(PyObject *);
25 PyAPI_FUNC(
int) PyCFunction_GetFlags(PyObject *);
29 #define PyCFunction_GET_FUNCTION(func) \
30 (((PyCFunctionObject *)func) -> m_ml -> ml_meth)
31 #define PyCFunction_GET_SELF(func) \
32 (((PyCFunctionObject *)func) -> m_self)
33 #define PyCFunction_GET_FLAGS(func) \
34 (((PyCFunctionObject *)func) -> m_ml -> ml_flags)
35 PyAPI_FUNC(PyObject *) PyCFunction_Call(PyObject *, PyObject *, PyObject *);
48 #define PyCFunction_New(ML, SELF) PyCFunction_NewEx((ML), (SELF), NULL)
49 PyAPI_FUNC(PyObject *) PyCFunction_NewEx(PyMethodDef *, PyObject *,
53 #define METH_OLDARGS 0x0000
54 #define METH_VARARGS 0x0001
55 #define METH_KEYWORDS 0x0002
57 #define METH_NOARGS 0x0004
63 #define METH_CLASS 0x0010
64 #define METH_STATIC 0x0020
71 #define METH_COEXIST 0x0040
88 PyAPI_FUNC(
int) PyCFunction_ClearFreeList(
void);