Improve the text about the readonly member of the Py_buffer structure and how it relates to locked views.
This commit is contained in:
parent
b9cf35b82a
commit
3454fb4ec8
14
pep-3118.txt
14
pep-3118.txt
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue