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