Lines Matching refs:func
10 PyObject *m_self; /* Passed as 'self' arg to the C func, can be NULL */
16 #define _PyCFunctionObject_CAST(func) \
17 (assert(PyCFunction_Check(func)), \
18 _Py_CAST(PyCFunctionObject*, (func)))
24 PyCFunctionObject func;
28 #define _PyCMethodObject_CAST(func) \
29 (assert(PyCMethod_Check(func)), \
30 _Py_CAST(PyCMethodObject*, (func)))
40 static inline PyCFunction PyCFunction_GET_FUNCTION(PyObject *func) {
41 return _PyCFunctionObject_CAST(func)->m_ml->ml_meth;
44 # define PyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(_PyObject_CAST(func))
48 PyCFunctionObject *func = _PyCFunctionObject_CAST(func_obj);
49 if (func->m_ml->ml_flags & METH_STATIC) {
52 return func->m_self;
55 # define PyCFunction_GET_SELF(func) PyCFunction_GET_SELF(_PyObject_CAST(func))
58 static inline int PyCFunction_GET_FLAGS(PyObject *func) {
59 return _PyCFunctionObject_CAST(func)->m_ml->ml_flags;
62 # define PyCFunction_GET_FLAGS(func) PyCFunction_GET_FLAGS(_PyObject_CAST(func))
66 PyCFunctionObject *func = _PyCFunctionObject_CAST(func_obj);
67 if (func->m_ml->ml_flags & METH_METHOD) {
68 return _PyCMethodObject_CAST(func)->mm_class;
73 # define PyCFunction_GET_CLASS(func) PyCFunction_GET_CLASS(_PyObject_CAST(func))