diff options
author | Alexandre Vassalotti <alexandre@peadrop.com> | 2009-07-22 03:56:36 (GMT) |
---|---|---|
committer | Alexandre Vassalotti <alexandre@peadrop.com> | 2009-07-22 03:56:36 (GMT) |
commit | 2db046dc39fd759242b9803d54884e179d599ebf (patch) | |
tree | 0ce342438340f12d8dd6cb43a02cf434d0cf8a73 /Include/descrobject.h | |
parent | cf76e1ac927cdc14ee321a363e161be24bfff059 (diff) | |
download | cpython-2db046dc39fd759242b9803d54884e179d599ebf.zip cpython-2db046dc39fd759242b9803d54884e179d599ebf.tar.gz cpython-2db046dc39fd759242b9803d54884e179d599ebf.tar.bz2 |
Issue #6151: Make PyDescr_COMMON conform to standard C.
Diffstat (limited to 'Include/descrobject.h')
-rw-r--r-- | Include/descrobject.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Include/descrobject.h b/Include/descrobject.h index f06b421..7c42808 100644 --- a/Include/descrobject.h +++ b/Include/descrobject.h @@ -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; |