funcobject.h 556 B

1234567891011121314151617181920212223242526
  1. /* Function object interface */
  2. #ifndef Py_FUNCOBJECT_H
  3. #define Py_FUNCOBJECT_H
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. typedef struct {
  8. PyObject_HEAD
  9. PyObject *func_name; /* The __name__ attribute, a string object */
  10. } PyFunctionObject;
  11. PyAPI_DATA(PyTypeObject) PyFunction_Type;
  12. #define PyFunction_GET_CODE(obj) PyFunction_GetCode((PyObject*)(obj))
  13. #define PyMethod_GET_FUNCTION(obj) PyMethod_Function((PyObject*)(obj))
  14. #define PyMethod_GET_SELF(obj) PyMethod_Self((PyObject*)(obj))
  15. #ifdef __cplusplus
  16. }
  17. #endif
  18. #endif /* !Py_FUNCOBJECT_H */