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
94ead57d
Commit
94ead57d
authored
Nov 09, 2001
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added version annotations, remove hard tabs.
parent
9f64caaf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
Doc/api/abstract.tex
Doc/api/abstract.tex
+11
-7
No files found.
Doc/api/abstract.tex
View file @
94ead57d
...
...
@@ -868,42 +868,46 @@ else {
/* continue doing useful work */
}
\section
{
Buffer Protocol
\label
{
buffer
}}
\section
{
Buffer Protocol
\label
{
abstract-
buffer
}}
\begin{cfuncdesc}
{
int
}{
PyObject
_
AsCharBuffer
}{
PyObject *obj,
const char **buffer,
int *buffer
_
len
}
const char **buffer,
int *buffer
_
len
}
Returns a pointer to a read-only memory location useable as character-
based input. The
\var
{
obj
}
argument must support the single-segment
character buffer interface. On success, returns
\code
{
1
}
, sets
\var
{
buffer
}
to the memory location and
\var
{
buffer
}
to the buffer
length. Returns
\code
{
0
}
and sets a
\exception
{
TypeError
}
on error.
\versionadded
{
1.6
}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyObject
_
AsReadBuffer
}{
PyObject *obj,
const char **buffer,
int *buffer
_
len
}
const char **buffer,
int *buffer
_
len
}
Returns a pointer to a read-only memory location containing
arbitrary data. The
\var
{
obj
}
argument must support the
single-segment readable buffer interface. On success, returns
\code
{
1
}
, sets
\var
{
buffer
}
to the memory location and
\var
{
buffer
}
to the buffer length. Returns
\code
{
0
}
and sets a
\exception
{
TypeError
}
on error.
\versionadded
{
1.6
}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyObject
_
CheckReadBuffer
}{
PyObject *o
}
Returns
\code
{
1
}
if
\var
{
o
}
supports the single-segment readable
buffer interface. Otherwise returns
\code
{
0
}
.
\versionadded
{
2.2
}
\enc
{
cfuncdesc
}
\begin{cfuncdesc}
{
int
}{
PyObject
_
AsWriteBuffer
}{
PyObject *obj,
const char **buffer,
int *buffer
_
len
}
const char **buffer,
int *buffer
_
len
}
Returns a pointer to a writeable memory location. The
\var
{
obj
}
argument must support the single-segment, character buffer
interface. On success, returns
\code
{
1
}
, sets
\var
{
buffer
}
to the
memory location and
\var
{
buffer
}
to the buffer length. Returns
\code
{
0
}
and sets a
\exception
{
TypeError
}
on error.
\versionadded
{
1.6
}
\end{cfuncdesc}
\end{verbatim}
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