Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r759:50830b7e09fa
Date: 2012-08-02 08:48 +0200
http://bitbucket.org/cffi/cffi/changeset/50830b7e09fa/

Log:    Documentation.

diff --git a/doc/source/index.rst b/doc/source/index.rst
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -836,7 +836,8 @@
 ``ffi.buffer(pointer, [size])``: return a read-write buffer object that
 references the raw C data pointed to by the given 'cdata', of 'size'
 bytes.  The 'cdata' must be a pointer or an array.  To get a copy of it
-in a regular string, call str() on the result.  If unspecified, the
+in a regular string, use ``ffi.buffer(..)[:]``.  To change the content,
+use ``ffi.buffer(..)[:] = new_string``.  If unspecified, the
 default size of the buffer is ``sizeof(*pointer)`` or the whole size of
 the array.  Getting a buffer is useful because you can read from it
 without an extra copy, or write into it to change the original value;
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to