Improve the text about the readonly member of the Py_buffer structure and how it relates to locked views.

This commit is contained in:
Travis E. Oliphant 2007-10-13 21:18:23 +00:00
parent b9cf35b82a
commit 3454fb4ec8
1 changed files with 7 additions and 7 deletions

View File

@ -344,13 +344,13 @@ The members of the bufferinfo structure are:
``readonly``
an integer variable to hold whether or not the memory is readonly.
1 means the memory is readonly, zero means the memory is writable,
-1 means the memory was "locked" (changed from writable to
readonly) when this Py_buffer structure was filled-in after a
readable request and therefore should be unlocked when this
Py_buffer structure is "released" (this is supported only by some
exporters). A -2 means this Py_buffer structure has an
exclusive-write lock on the memory. This should be unlocked when
the Py_buffer structure is released.
-1 means the memory was read "locked" when this Py_buffer
structure was filled-in therefore should be unlocked when this
Py_buffer structure is "released." A -2 means this Py_buffer
structure has an exclusive-write lock on the memory. This should
be unlocked when the Py_buffer structure is released. The concept
of locking is not supported by all objects that expose the buffer
protocol.
``format``
a NULL-terminated format-string (following the struct-style syntax