Issue #6151: Make PyDescr_COMMON conform to standard C.

This commit is contained in:
Alexandre Vassalotti 2009-07-22 03:56:36 +00:00
parent cf76e1ac92
commit 2db046dc39
4 changed files with 31 additions and 23 deletions

View file

@ -37,15 +37,17 @@ struct wrapperbase {
/* Various kinds of descriptor objects */
#define PyDescr_COMMON \
PyObject_HEAD \
PyTypeObject *d_type; \
PyObject *d_name
typedef struct {
PyDescr_COMMON;
PyObject_HEAD
PyTypeObject *d_type;
PyObject *d_name;
} PyDescrObject;
#define PyDescr_COMMON PyDescrObject d_common
#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
typedef struct {
PyDescr_COMMON;
PyMethodDef *d_method;