summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/abstract.h2
-rw-r--r--Include/memoryobject.h2
-rw-r--r--Include/object.h3
3 files changed, 6 insertions, 1 deletions
diff --git a/Include/abstract.h b/Include/abstract.h
index 53c9dc7..5f2d541 100644
--- a/Include/abstract.h
+++ b/Include/abstract.h
@@ -488,6 +488,7 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
/* new buffer API */
+#ifndef Py_LIMITED_API
#define PyObject_CheckBuffer(obj) \
(((obj)->ob_type->tp_as_buffer != NULL) && \
((obj)->ob_type->tp_as_buffer->bf_getbuffer != NULL))
@@ -575,6 +576,7 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
/* Releases a Py_buffer obtained from getbuffer ParseTuple's s*.
*/
+#endif /* Py_LIMITED_API */
PyAPI_FUNC(PyObject *) PyObject_Format(PyObject* obj,
PyObject *format_spec);
diff --git a/Include/memoryobject.h b/Include/memoryobject.h
index f763531..62ecbd6 100644
--- a/Include/memoryobject.h
+++ b/Include/memoryobject.h
@@ -55,9 +55,11 @@ PyAPI_FUNC(PyObject *) PyMemoryView_GetContiguous(PyObject *base,
PyAPI_FUNC(PyObject *) PyMemoryView_FromObject(PyObject *base);
+#ifndef Py_LIMITED_API
PyAPI_FUNC(PyObject *) PyMemoryView_FromBuffer(Py_buffer *info);
/* create new if bufptr is NULL
will be a new bytesobject in base */
+#endif
/* The struct is declared here so that macros can work, but it shouldn't
diff --git a/Include/object.h b/Include/object.h
index 78bb13b..690f87b 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -143,7 +143,7 @@ typedef int(*ssizeobjargproc)(PyObject *, Py_ssize_t, PyObject *);
typedef int(*ssizessizeobjargproc)(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *);
typedef int(*objobjargproc)(PyObject *, PyObject *, PyObject *);
-
+#ifndef Py_LIMITED_API
/* buffer interface */
typedef struct bufferinfo {
void *buf;
@@ -195,6 +195,7 @@ typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
#define PyBUF_WRITE 0x200
/* End buffer interface */
+#endif /* Py_LIMITED_API */
typedef int (*objobjproc)(PyObject *, PyObject *);
typedef int (*visitproc)(PyObject *, void *);