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
89c4ad84
Commit
89c4ad84
authored
Jun 07, 2006
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify documentation for bf_getcharbuffer.
parent
d744caa7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
Doc/api/newtypes.tex
Doc/api/newtypes.tex
+10
-6
No files found.
Doc/api/newtypes.tex
View file @
89c4ad84
...
...
@@ -1549,7 +1549,9 @@ to be able to test for its presence before using it.}
Before using this slot, the caller should test whether it is present
by using the
\cfunction
{
PyType
_
HasFeature()
}
\ttindex
{
PyType
_
HasFeature()
}
function. If present, it may be
\NULL
, indicating that the object's
function. If the flag is present,
\member
{
bf
_
getcharbuffer
}
may be
\NULL
,
indicating that the object's
contents cannot be used as
\emph
{
8-bit characters
}
.
The slot function may also raise an error if the object's contents
cannot be interpreted as 8-bit characters. For example, if the
...
...
@@ -1574,12 +1576,13 @@ to be able to test for its presence before using it.}
\begin{ctypedesc}
[getreadbufferproc]
{
Py
_
ssize
_
t (*readbufferproc)
(PyObject *self, Py
_
ssize
_
t segment, void **ptrptr)
}
Return a pointer to a readable segment of the buffer. This function
Return a pointer to a readable segment of the buffer in
\code
{
*
\var
{
ptrptr
}}
. This function
is allowed to raise an exception, in which case it must return
\code
{
-1
}
. The
\var
{
segment
}
which is
pass
ed must be zero or
\code
{
-1
}
. The
\var
{
segment
}
which is
specifi
ed must be zero or
positive, and strictly less than the number of segments returned by
the
\member
{
bf
_
getsegcount
}
slot function. On success, it returns
the length of the
buffer memory
, and sets
\code
{
*
\var
{
ptrptr
}}
to a
the length of the
segment
, and sets
\code
{
*
\var
{
ptrptr
}}
to a
pointer to that memory.
\end{ctypedesc}
...
...
@@ -1608,8 +1611,9 @@ to be able to test for its presence before using it.}
\begin{ctypedesc}
[getcharbufferproc]
{
Py
_
ssize
_
t (*charbufferproc)
(PyObject *self, Py
_
ssize
_
t segment, const char **ptrptr)
}
Return the size of the memory buffer in
\var
{
ptrptr
}
for segment
\var
{
segment
}
.
\code
{
*
\var
{
ptrptr
}}
is set to the memory buffer.
Return the size of the segment
\var
{
segment
}
that
\var
{
ptrptr
}
is set to.
\code
{
*
\var
{
ptrptr
}}
is set to the memory buffer.
Returns
\code
{
-1
}
on error.
\end{ctypedesc}
...
...
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