aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2009-07-22 03:56:36 +0000
committerAlexandre Vassalotti <alexandre@peadrop.com>2009-07-22 03:56:36 +0000
commit2db046dc39fd759242b9803d54884e179d599ebf (patch)
tree0ce342438340f12d8dd6cb43a02cf434d0cf8a73 /Include/descrobject.h
parentIssue #6218: Make io.BytesIO and io.StringIO picklable. (diff)
downloadcpython-2db046dc39fd759242b9803d54884e179d599ebf.tar.gz
cpython-2db046dc39fd759242b9803d54884e179d599ebf.tar.bz2
cpython-2db046dc39fd759242b9803d54884e179d599ebf.zip
Issue #6151: Make PyDescr_COMMON conform to standard C.
Diffstat (limited to 'Include/descrobject.h')
-rw-r--r--Include/descrobject.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/Include/descrobject.h b/Include/descrobject.h
index f06b42190d9..7c42808c59e 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;