summaryrefslogtreecommitdiffstats
path: root/Include/object.h
diff options
context:
space:
mode:
authorTravis E. Oliphant <oliphant@enthought.com>2007-10-12 23:27:53 (GMT)
committerTravis E. Oliphant <oliphant@enthought.com>2007-10-12 23:27:53 (GMT)
commitfe9bed02e430613f95849fa49aaa4f823a762738 (patch)
treef26a61380fcfda85caaaf70f55e74c75c5a0b90f /Include/object.h
parent9b30784ab2867bcb7335add7306bbd71e2de2151 (diff)
downloadcpython-fe9bed02e430613f95849fa49aaa4f823a762738.zip
cpython-fe9bed02e430613f95849fa49aaa4f823a762738.tar.gz
cpython-fe9bed02e430613f95849fa49aaa4f823a762738.tar.bz2
Fix problems with memoryview object. There is still more to do to finish PEP 3118. The memory-view object needs to be fleshed out and the struct module needs to be modified.
Diffstat (limited to 'Include/object.h')
-rw-r--r--Include/object.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/Include/object.h b/Include/object.h
index 88a3b84..c9d2217 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -164,7 +164,7 @@ typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
#define PyBUF_WRITABLE 0x0002
/* we used to include an E, backwards compatible alias */
#define PyBUF_WRITEABLE PyBUF_WRITABLE
-#define PyBUF_LOCKDATA 0x0004
+#define PyBUF_LOCK 0x0004
#define PyBUF_FORMAT 0x0008
#define PyBUF_ND 0x0010
#define PyBUF_STRIDES (0x0020 | PyBUF_ND)
@@ -175,19 +175,25 @@ typedef void (*releasebufferproc)(PyObject *, Py_buffer *);
#define PyBUF_CONTIG (PyBUF_ND | PyBUF_WRITABLE)
#define PyBUF_CONTIG_RO (PyBUF_ND)
-#define PyBUF_CONTIG_LCK (PyBUF_ND | PyBUF_LOCKDATA)
+#define PyBUF_CONTIG_LCK (PyBUF_ND | PyBUF_LOCK)
+#define PyBUF_CONTIG_XLCK (PyBUF_ND | PyBUF_LOCK | PyBUF_WRITABLE)
#define PyBUF_STRIDED (PyBUF_STRIDES | PyBUF_WRITABLE)
#define PyBUF_STRIDED_RO (PyBUF_STRIDES)
-#define PyBUF_STRIDED_LCK (PyBUF_STRIDES | PyBUF_LOCKDATA)
+#define PyBUF_STRIDED_LCK (PyBUF_STRIDES | PyBUF_LOCK)
+#define PyBUF_STRIDED_XLCK (PyBUF_STRIDES | PyBUF_LOCK | PyBUF_WRITABLE)
#define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_WRITABLE | PyBUF_FORMAT)
#define PyBUF_RECORDS_RO (PyBUF_STRIDES | PyBUF_FORMAT)
-#define PyBUF_RECORDS_LCK (PyBUF_STRIDES | PyBUF_LOCKDATA | PyBUF_FORMAT)
+#define PyBUF_RECORDS_LCK (PyBUF_STRIDES | PyBUF_LOCK | PyBUF_FORMAT)
+#define PyBUF_RECORDS_XLCK (PyBUF_STRIDES | PyBUF_LOCK | PyBUF_WRITABLE \
+ | PyBUF_FORMAT)
#define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_WRITABLE | PyBUF_FORMAT)
#define PyBUF_FULL_RO (PyBUF_INDIRECT | PyBUF_FORMAT)
-#define PyBUF_FULL_LCK (PyBUF_INDIRECT | PyBUF_LOCKDATA | PyBUF_FORMAT)
+#define PyBUF_FULL_LCK (PyBUF_INDIRECT | PyBUF_LOCK | PyBUF_FORMAT)
+#define PyBUF_FULL_XLCK (PyBUF_INDIRECT | PyBUF_LOCK | PyBUF_WRITABLE \
+ | PyBUF_FORMAT)
#define PyBUF_READ 0x100