diff options
author | Jeroen Ruigrok van der Werven <asmodai@in-nomine.org> | 2009-04-27 05:43:17 (GMT) |
---|---|---|
committer | Jeroen Ruigrok van der Werven <asmodai@in-nomine.org> | 2009-04-27 05:43:17 (GMT) |
commit | 47a7d70002243bd421664aa2f8300fcfecf3e9f5 (patch) | |
tree | 415121c8f8231e25dd7686796a2d90680454cabe /Doc/c-api/objbuffer.rst | |
parent | 5c32f671f60c1927951161432b4ee3b4fa68e212 (diff) | |
download | cpython-47a7d70002243bd421664aa2f8300fcfecf3e9f5.zip cpython-47a7d70002243bd421664aa2f8300fcfecf3e9f5.tar.gz cpython-47a7d70002243bd421664aa2f8300fcfecf3e9f5.tar.bz2 |
Merged revisions 71920-71923,71925-71929,71931-71934,71937 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r71920 | jeroen.ruigrok | 2009-04-25 21:44:55 +0200 (za, 25 apr 2009) | 5 lines
Issue #4129: More documentation pointers about int -> Py_ssize_t.
Also fix up the documentation for PyObject_GC_Resize(). It seems that since
it first got documented, the documentation was actually for
_PyObject_GC_Resize().
........
r71921 | jeroen.ruigrok | 2009-04-25 21:46:19 +0200 (za, 25 apr 2009) | 2 lines
Issue #4129: Documentation notes for int -> Py_ssize_t changes.
........
r71922 | jeroen.ruigrok | 2009-04-25 21:49:05 +0200 (za, 25 apr 2009) | 2 lines
Reformat, since I've been busy here anyway.
........
r71923 | jeroen.ruigrok | 2009-04-25 21:54:34 +0200 (za, 25 apr 2009) | 2 lines
Issue #4129: Add a versionchanged notice for a few forgotten entries.
........
r71925 | jeroen.ruigrok | 2009-04-25 22:37:39 +0200 (za, 25 apr 2009) | 2 lines
Since it's a macro, actually refer to it as such instead of function.
........
r71926 | jeroen.ruigrok | 2009-04-25 22:40:10 +0200 (za, 25 apr 2009) | 2 lines
Reformat prior to editing.
........
r71927 | jeroen.ruigrok | 2009-04-25 22:41:40 +0200 (za, 25 apr 2009) | 2 lines
Issue #4129: int -> Py_ssize_t documentation.
........
r71928 | jeroen.ruigrok | 2009-04-25 22:43:30 +0200 (za, 25 apr 2009) | 2 lines
Reformat prior to editing.
........
r71929 | jeroen.ruigrok | 2009-04-25 22:44:58 +0200 (za, 25 apr 2009) | 2 lines
Issue #4129: int -> Py_ssize_t documentation.
........
r71931 | jeroen.ruigrok | 2009-04-25 22:50:27 +0200 (za, 25 apr 2009) | 2 lines
Issue #4129: int -> Py_ssize_t documentation.
........
r71932 | jeroen.ruigrok | 2009-04-25 22:55:39 +0200 (za, 25 apr 2009) | 2 lines
Issue #4129: more int -> Py_ssize_t documentation.
........
r71933 | jeroen.ruigrok | 2009-04-25 22:58:35 +0200 (za, 25 apr 2009) | 2 lines
Issue #4129: more int -> Py_ssize_t documentation.
........
r71934 | jeroen.ruigrok | 2009-04-25 23:02:34 +0200 (za, 25 apr 2009) | 2 lines
Issue #4129: field changed from int to Py_ssize_t.
........
r71937 | jeroen.ruigrok | 2009-04-25 23:16:05 +0200 (za, 25 apr 2009) | 2 lines
Issue #4129: document int -> Py_ssize_t changes.
........
Diffstat (limited to 'Doc/c-api/objbuffer.rst')
-rw-r--r-- | Doc/c-api/objbuffer.rst | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/Doc/c-api/objbuffer.rst b/Doc/c-api/objbuffer.rst index 3c5dc99..e816c3d 100644 --- a/Doc/c-api/objbuffer.rst +++ b/Doc/c-api/objbuffer.rst @@ -10,17 +10,26 @@ Buffer Protocol Returns a pointer to a read-only memory location usable as character-based input. The *obj* argument must support the single-segment character buffer - interface. On success, returns ``0``, sets *buffer* to the memory location and - *buffer_len* to the buffer length. Returns ``-1`` and sets a :exc:`TypeError` - on error. + interface. On success, returns ``0``, sets *buffer* to the memory location + and *buffer_len* to the buffer length. Returns ``-1`` and sets a + :exc:`TypeError` on error. + + .. versionchanged:: 2.5 + This function used an :ctype:`int *` type for *buffer_len*. This might + require changes in your code for properly supporting 64-bit systems. .. cfunction:: int PyObject_AsReadBuffer(PyObject *obj, const void **buffer, Py_ssize_t *buffer_len) - Returns a pointer to a read-only memory location containing arbitrary data. The - *obj* argument must support the single-segment readable buffer interface. On - success, returns ``0``, sets *buffer* to the memory location and *buffer_len* to - the buffer length. Returns ``-1`` and sets a :exc:`TypeError` on error. + Returns a pointer to a read-only memory location containing arbitrary data. + The *obj* argument must support the single-segment readable buffer + interface. On success, returns ``0``, sets *buffer* to the memory location + and *buffer_len* to the buffer length. Returns ``-1`` and sets a + :exc:`TypeError` on error. + + .. versionchanged:: 2.5 + This function used an :ctype:`int *` type for *buffer_len*. This might + require changes in your code for properly supporting 64-bit systems. .. cfunction:: int PyObject_CheckReadBuffer(PyObject *o) @@ -32,6 +41,11 @@ Buffer Protocol .. cfunction:: int PyObject_AsWriteBuffer(PyObject *obj, void **buffer, Py_ssize_t *buffer_len) Returns a pointer to a writable memory location. The *obj* argument must - support the single-segment, character buffer interface. On success, returns - ``0``, sets *buffer* to the memory location and *buffer_len* to the buffer - length. Returns ``-1`` and sets a :exc:`TypeError` on error. + support the single-segment, character buffer interface. On success, + returns ``0``, sets *buffer* to the memory location and *buffer_len* to the + buffer length. Returns ``-1`` and sets a :exc:`TypeError` on error. + + .. versionchanged:: 2.5 + This function used an :ctype:`int *` type for *buffer_len*. This might + require changes in your code for properly supporting 64-bit systems. + |