Author: mattip <matti.pi...@gmail.com>
Branch: cpyext-ext
Changeset: r81794:0309d3b5553a
Date: 2016-01-15 15:41 +0200
http://bitbucket.org/pypy/pypy/changeset/0309d3b5553a/

Log:    make the header compatible with cpython

diff --git a/pypy/module/cpyext/include/descrobject.h 
b/pypy/module/cpyext/include/descrobject.h
--- a/pypy/module/cpyext/include/descrobject.h
+++ b/pypy/module/cpyext/include/descrobject.h
@@ -12,13 +12,13 @@
 } PyGetSetDef;
 
 
-#define PyDescr_COMMON PyDescrObject d_common
+#define PyDescr_COMMON \
+    PyObject_HEAD \
+    PyTypeObject *d_type; \
+    PyObject *d_name
 
 typedef struct {
-    PyObject_HEAD
-    PyTypeObject *d_type;
-    PyObject *d_name;
-    PyObject *d_qualname;
+    PyDescr_COMMON;
 } PyDescrObject;
 
 typedef struct {
@@ -28,12 +28,18 @@
 
 typedef struct {
     PyDescr_COMMON;
+    struct PyMemberDef *d_member;
+} PyMemberDescrObject;
+
+typedef struct {
+    PyDescr_COMMON;
     PyGetSetDef *d_getset;
 } PyGetSetDescrObject;
 
 typedef struct {
     PyDescr_COMMON;
-    struct PyMemberDef *d_member;
-} PyMemberDescrObject;
+    struct wrapperbase *d_base;
+    void *d_wrapped; /* This can be any function pointer */
+} PyWrapperDescrObject;
 
 #endif
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to