Changeset 388 for python/vendor/current/Include/descrobject.h
- Timestamp:
- Mar 19, 2014, 11:11:30 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/vendor/current/Include/descrobject.h
r2 r388 10 10 11 11 typedef struct PyGetSetDef { 12 13 14 15 16 12 char *name; 13 getter get; 14 setter set; 15 char *doc; 16 void *closure; 17 17 } PyGetSetDef; 18 18 19 19 typedef PyObject *(*wrapperfunc)(PyObject *self, PyObject *args, 20 20 void *wrapped); 21 21 22 22 typedef PyObject *(*wrapperfunc_kwds)(PyObject *self, PyObject *args, 23 23 void *wrapped, PyObject *kwds); 24 24 25 25 struct wrapperbase { 26 27 28 29 30 31 32 26 char *name; 27 int offset; 28 void *function; 29 wrapperfunc wrapper; 30 char *doc; 31 int flags; 32 PyObject *name_strobj; 33 33 }; 34 34 … … 39 39 40 40 #define PyDescr_COMMON \ 41 42 43 41 PyObject_HEAD \ 42 PyTypeObject *d_type; \ 43 PyObject *d_name 44 44 45 45 typedef struct { 46 46 PyDescr_COMMON; 47 47 } PyDescrObject; 48 48 49 49 typedef struct { 50 51 50 PyDescr_COMMON; 51 PyMethodDef *d_method; 52 52 } PyMethodDescrObject; 53 53 54 54 typedef struct { 55 56 55 PyDescr_COMMON; 56 struct PyMemberDef *d_member; 57 57 } PyMemberDescrObject; 58 58 59 59 typedef struct { 60 61 60 PyDescr_COMMON; 61 PyGetSetDef *d_getset; 62 62 } PyGetSetDescrObject; 63 63 64 64 typedef struct { 65 66 67 65 PyDescr_COMMON; 66 struct wrapperbase *d_base; 67 void *d_wrapped; /* This can be any function pointer */ 68 68 } PyWrapperDescrObject; 69 69 … … 76 76 PyAPI_FUNC(PyObject *) PyDescr_NewClassMethod(PyTypeObject *, PyMethodDef *); 77 77 PyAPI_FUNC(PyObject *) PyDescr_NewMember(PyTypeObject *, 78 78 struct PyMemberDef *); 79 79 PyAPI_FUNC(PyObject *) PyDescr_NewGetSet(PyTypeObject *, 80 80 struct PyGetSetDef *); 81 81 PyAPI_FUNC(PyObject *) PyDescr_NewWrapper(PyTypeObject *, 82 82 struct wrapperbase *, void *); 83 83 #define PyDescr_IsData(d) (Py_TYPE(d)->tp_descr_set != NULL) 84 84
Note:
See TracChangeset
for help on using the changeset viewer.