summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2008-08-27 00:45:02 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2008-08-27 00:45:02 (GMT)
commitc9b41106e84f2c4e0c9a761840207567b364615c (patch)
treec136f518cdeaf58c742f4363577e436d237f1a65 /Doc/whatsnew
parentd207e230e104849807380de8f6f8915ae6989ee9 (diff)
downloadcpython-c9b41106e84f2c4e0c9a761840207567b364615c.zip
cpython-c9b41106e84f2c4e0c9a761840207567b364615c.tar.gz
cpython-c9b41106e84f2c4e0c9a761840207567b364615c.tar.bz2
Add an item and a note
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/2.6.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst
index 49be369..64c68f6 100644
--- a/Doc/whatsnew/2.6.rst
+++ b/Doc/whatsnew/2.6.rst
@@ -1053,8 +1053,7 @@ packages such as NumPy, which can expose the internal representation
of arrays so that callers can write data directly into an array instead
of going through a slower API. This PEP updates the buffer protocol in light of experience
from NumPy development, adding a number of new features
-such as indicating the shape of an array,
-locking memory .
+such as indicating the shape of an array or locking a memory region.
The most important new C API function is
``PyObject_GetBuffer(PyObject *obj, Py_buffer *view, int flags)``, which
@@ -1063,10 +1062,11 @@ takes an object and a set of flags, and fills in the
about the object's memory representation. Objects
can use this operation to lock memory in place
while an external caller could be modifying the contents,
-so there's a corresponding
-``PyBuffer_Release(Py_buffer *view)`` to
+so there's a corresponding ``PyBuffer_Release(Py_buffer *view)`` to
indicate that the external caller is done.
+.. XXX PyObject_GetBuffer not documented in c-api
+
The **flags** argument to :cfunc:`PyObject_GetBuffer` specifies
constraints upon the memory returned. Some examples are:
@@ -1078,7 +1078,8 @@ constraints upon the memory returned. Some examples are:
requests a C-contiguous (last dimension varies the fastest) or
Fortran-contiguous (first dimension varies the fastest) layout.
-.. XXX this feature is not in 2.6 docs yet
+Two new argument codes for :cfunc:`PyArg_ParseTuple`,
+``s*`` and ``z*``, return locked buffer objects for a parameter.
.. seealso::