[Python-checkins] r56949 - peps/trunk/pep-3118.txt
travis.oliphant
python-checkins at python.org
Sun Aug 12 08:19:15 CEST 2007
Author: travis.oliphant
Date: Sun Aug 12 08:19:14 2007
New Revision: 56949
Modified:
peps/trunk/pep-3118.txt
Log:
Add the PyBUF_CHARACTER flag to properly handle the CharBuffer case for at least the unicode type.
Modified: peps/trunk/pep-3118.txt
==============================================================================
--- peps/trunk/pep-3118.txt (original)
+++ peps/trunk/pep-3118.txt Sun Aug 12 08:19:14 2007
@@ -193,6 +193,13 @@
needs to be \|'d to the others. The exporter will raise an error if
it cannot provide such a contiguous buffer of bytes.
+``PyBUF_CHARACTER``
+
+ This essentially replaces the separate function for getting a character
+ buffer (which is useful in at least the unicode type). If an object
+ should do something different when it is requested as a character
+ buffer then it should detect this flag and respond differently.
+
``PyBUF_REQ_WRITEABLE``
The returned buffer must be writeable. If it is not writeable,
@@ -558,7 +565,7 @@
The buffertype argument can be PyBUF_READ, PyBUF_WRITE,
PyBUF_UPDATEIFCOPY to determine whether the returned buffer should be
-READONLY, WRITEABLE, or set to update the original buffer if a copy
+readable, writeable, or set to update the original buffer if a copy
must be made. If buffertype is PyBUF_WRITE and the buffer is not
contiguous an error will be raised. In this circumstance, the user
can use PyBUF_UPDATEIFCOPY to ensure that a a writeable temporary
More information about the Python-checkins
mailing list