mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Issue #6151: Make PyDescr_COMMON conform to standard C.
This commit is contained in:
parent
cf76e1ac92
commit
2db046dc39
4 changed files with 31 additions and 23 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue