Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
9b50786b
Commit
9b50786b
authored
Apr 06, 2017
by
Eric Wieser
Committed by
Serhiy Storchaka
Apr 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix references within buffer protocol docs (#1016)
parent
d7564e53
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Doc/c-api/typeobj.rst
Doc/c-api/typeobj.rst
+4
-4
No files found.
Doc/c-api/typeobj.rst
View file @
9b50786b
...
...
@@ -1377,23 +1377,23 @@ member in the :c:type:`PyTypeObject` structure should be *NULL*. Otherwise, the
Structure used to hold the function pointers which define an implementation of
the buffer protocol.
The first slot is :attr:`bf_getreadbuffer`, of type :c:type:`
get
readbufferproc`.
The first slot is :attr:`bf_getreadbuffer`, of type :c:type:`readbufferproc`.
If this slot is *NULL*, then the object does not support reading from the
internal data. This is non-sensical, so implementors should fill this in, but
callers should test that the slot contains a non-*NULL* value.
The next slot is :attr:`bf_getwritebuffer` having type
:c:type:`
get
writebufferproc`. This slot may be *NULL* if the object does not
:c:type:`writebufferproc`. This slot may be *NULL* if the object does not
allow writing into its returned buffers.
The third slot is :attr:`bf_getsegcount`, with type :c:type:`
get
segcountproc`.
The third slot is :attr:`bf_getsegcount`, with type :c:type:`segcountproc`.
This slot must not be *NULL* and is used to inform the caller how many segments
the object contains. Simple objects such as :c:type:`PyString_Type` and
:c:type:`PyBuffer_Type` objects contain a single segment.
.. index:: single: PyType_HasFeature()
The last slot is :attr:`bf_getcharbuffer`, of type :c:type:`
get
charbufferproc`.
The last slot is :attr:`bf_getcharbuffer`, of type :c:type:`charbufferproc`.
This slot will only be present if the :const:`Py_TPFLAGS_HAVE_GETCHARBUFFER`
flag is present in the :c:member:`~PyTypeObject.tp_flags` field of the object's
:c:type:`PyTypeObject`. Before using this slot, the caller should test whether it
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment