4 #ifndef Py_FUNCOBJECT_H
5 #define Py_FUNCOBJECT_H
42 #define PyFunction_Check(op) (Py_TYPE(op) == &PyFunction_Type)
45 PyAPI_FUNC(PyObject *) PyFunction_GetCode(PyObject *);
46 PyAPI_FUNC(PyObject *) PyFunction_GetGlobals(PyObject *);
47 PyAPI_FUNC(PyObject *) PyFunction_GetModule(PyObject *);
48 PyAPI_FUNC(PyObject *) PyFunction_GetDefaults(PyObject *);
49 PyAPI_FUNC(
int) PyFunction_SetDefaults(PyObject *, PyObject *);
50 PyAPI_FUNC(PyObject *) PyFunction_GetClosure(PyObject *);
51 PyAPI_FUNC(
int) PyFunction_SetClosure(PyObject *, PyObject *);
55 #define PyFunction_GET_CODE(func) \
56 (((PyFunctionObject *)func) -> func_code)
57 #define PyFunction_GET_GLOBALS(func) \
58 (((PyFunctionObject *)func) -> func_globals)
59 #define PyFunction_GET_MODULE(func) \
60 (((PyFunctionObject *)func) -> func_module)
61 #define PyFunction_GET_DEFAULTS(func) \
62 (((PyFunctionObject *)func) -> func_defaults)
63 #define PyFunction_GET_CLOSURE(func) \
64 (((PyFunctionObject *)func) -> func_closure)
70 PyAPI_FUNC(PyObject *) PyClassMethod_New(PyObject *);
71 PyAPI_FUNC(PyObject *) PyStaticMethod_New(PyObject *);