[pypy-commit] cffi default: Document more this change
arigo
noreply at buildbot.pypy.org
Fri Dec 6 20:37:20 CET 2013
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r1438:4581bf09fb68
Date: 2013-12-06 20:37 +0100
http://bitbucket.org/cffi/cffi/changeset/4581bf09fb68/
Log: Document more this change
diff --git a/doc/source/index.rst b/doc/source/index.rst
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -1188,8 +1188,12 @@
Moreover buffer objects now support weakrefs to them.
.. versionchanged:: 0.9
- Before version 0.9, ``bytes(buf)`` was supported in Python 3 but not
- Python 2.
+ Before version 0.9, ``bytes(buf)`` was supported in Python 3 to get
+ the content of the buffer, but on Python 2 it would return the repr
+ ``<_cffi_backend.buffer object>``. This has been fixed. But you
+ should avoid using ``str(buf)``: it now gives inconsistent results
+ between Python 2 and Python 3 (this is similar to how ``str()``
+ gives inconsistent results on regular byte strings).
``ffi.typeof("C type" or cdata object)``: return an object of type
More information about the pypy-commit
mailing list