summaryrefslogtreecommitdiffstats
path: root/Include/memoryobject.h
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2010-12-03 20:14:31 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2010-12-03 20:14:31 (GMT)
commit4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9 (patch)
treec8f1fef715f8d158e58f17cab14af65455de1d77 /Include/memoryobject.h
parentc4df7845143f9afe0d20f4421a41904f3cbb991a (diff)
downloadcpython-4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9.zip
cpython-4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9.tar.gz
cpython-4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9.tar.bz2
Merge branches/pep-0384.
Diffstat (limited to 'Include/memoryobject.h')
-rw-r--r--Include/memoryobject.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Include/memoryobject.h b/Include/memoryobject.h
index 5bbfb05..f763531 100644
--- a/Include/memoryobject.h
+++ b/Include/memoryobject.h
@@ -10,10 +10,12 @@ PyAPI_DATA(PyTypeObject) PyMemoryView_Type;
#define PyMemoryView_Check(op) (Py_TYPE(op) == &PyMemoryView_Type)
+#ifndef Py_LIMITED_API
/* Get a pointer to the underlying Py_buffer of a memoryview object. */
#define PyMemoryView_GET_BUFFER(op) (&((PyMemoryViewObject *)(op))->view)
/* Get a pointer to the PyObject from which originates a memoryview object. */
#define PyMemoryView_GET_BASE(op) (((PyMemoryViewObject *)(op))->view.obj)
+#endif
PyAPI_FUNC(PyObject *) PyMemoryView_GetContiguous(PyObject *base,
@@ -61,11 +63,12 @@ PyAPI_FUNC(PyObject *) PyMemoryView_FromBuffer(Py_buffer *info);
/* The struct is declared here so that macros can work, but it shouldn't
be considered public. Don't access those fields directly, use the macros
and functions instead! */
+#ifndef Py_LIMITED_API
typedef struct {
PyObject_HEAD
Py_buffer view;
} PyMemoryViewObject;
-
+#endif
#ifdef __cplusplus
}