12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- extern "C" {
- typedef struct {
- PyObject_HEAD
- PyObject *func_code;
- PyObject *func_globals;
- PyObject *func_defaults;
- PyObject *func_closure;
- PyObject *func_doc;
- PyObject *func_name;
- PyObject *func_dict;
- PyObject *func_weakreflist;
- PyObject *func_module;
-
- } PyFunctionObject;
- PyAPI_DATA(PyTypeObject) PyFunction_Type;
- PyAPI_FUNC(PyObject *) PyFunction_New(PyObject *, PyObject *);
- PyAPI_FUNC(PyObject *) PyFunction_GetCode(PyObject *);
- PyAPI_FUNC(PyObject *) PyFunction_GetGlobals(PyObject *);
- PyAPI_FUNC(PyObject *) PyFunction_GetModule(PyObject *);
- PyAPI_FUNC(PyObject *) PyFunction_GetDefaults(PyObject *);
- PyAPI_FUNC(int) PyFunction_SetDefaults(PyObject *, PyObject *);
- PyAPI_FUNC(PyObject *) PyFunction_GetClosure(PyObject *);
- PyAPI_FUNC(int) PyFunction_SetClosure(PyObject *, PyObject *);
- (((PyFunctionObject *)func) -> func_code)
- #define PyFunction_GET_GLOBALS(func) \
- (((PyFunctionObject *)func) -> func_globals)
- #define PyFunction_GET_MODULE(func) \
- (((PyFunctionObject *)func) -> func_module)
- #define PyFunction_GET_DEFAULTS(func) \
- (((PyFunctionObject *)func) -> func_defaults)
- #define PyFunction_GET_CLOSURE(func) \
- (((PyFunctionObject *)func) -> func_closure)
- /* The classmethod and staticmethod types lives here, too */
- PyAPI_DATA(PyTypeObject) PyClassMethod_Type;
- PyAPI_DATA(PyTypeObject) PyStaticMethod_Type;
- PyAPI_FUNC(PyObject *) PyClassMethod_New(PyObject *);
- PyAPI_FUNC(PyObject *) PyStaticMethod_New(PyObject *);
- #ifdef __cplusplus
- }
- #endif
- #endif /* !Py_FUNCOBJECT_H */
|