1/* Descriptors */ 2#ifndef Py_DESCROBJECT_H 3#define Py_DESCROBJECT_H 4#ifdef __cplusplus 5extern "C" { 6#endif 7 8typedef PyObject *(*getter)(PyObject *, void *); 9typedef int (*setter)(PyObject *, PyObject *, void *); 10 11struct PyGetSetDef { 12 const char *name; 13 getter get; 14 setter set; 15 const char *doc; 16 void *closure; 17}; 18 19PyAPI_DATA(PyTypeObject) PyClassMethodDescr_Type; 20PyAPI_DATA(PyTypeObject) PyGetSetDescr_Type; 21PyAPI_DATA(PyTypeObject) PyMemberDescr_Type; 22PyAPI_DATA(PyTypeObject) PyMethodDescr_Type; 23PyAPI_DATA(PyTypeObject) PyWrapperDescr_Type; 24PyAPI_DATA(PyTypeObject) PyDictProxy_Type; 25PyAPI_DATA(PyTypeObject) PyProperty_Type; 26 27PyAPI_FUNC(PyObject *) PyDescr_NewMethod(PyTypeObject *, PyMethodDef *); 28PyAPI_FUNC(PyObject *) PyDescr_NewClassMethod(PyTypeObject *, PyMethodDef *); 29PyAPI_FUNC(PyObject *) PyDescr_NewMember(PyTypeObject *, PyMemberDef *); 30PyAPI_FUNC(PyObject *) PyDescr_NewGetSet(PyTypeObject *, PyGetSetDef *); 31 32PyAPI_FUNC(PyObject *) PyDictProxy_New(PyObject *); 33PyAPI_FUNC(PyObject *) PyWrapper_New(PyObject *, PyObject *); 34 35#ifndef Py_LIMITED_API 36# define Py_CPYTHON_DESCROBJECT_H 37# include "cpython/descrobject.h" 38# undef Py_CPYTHON_DESCROBJECT_H 39#endif 40 41#ifdef __cplusplus 42} 43#endif 44#endif /* !Py_DESCROBJECT_H */ 45