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
e7b27468
Commit
e7b27468
authored
Feb 12, 2001
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PyTuple_*() functions take PyObject* parameters, not PyTupleObject* values.
This closes SF bug #131304.
parent
6d1ea96c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
Doc/api/api.tex
Doc/api/api.tex
+6
-7
No files found.
Doc/api/api.tex
View file @
e7b27468
...
@@ -3088,24 +3088,23 @@ Return true if the argument is a tuple object.
...
@@ -3088,24 +3088,23 @@ Return true if the argument is a tuple object.
Return a new tuple object of size
\var
{
len
}
, or
\NULL
{}
on failure.
Return a new tuple object of size
\var
{
len
}
, or
\NULL
{}
on failure.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyTuple
_
Size
}{
Py
Tuple
Object *p
}
\begin{cfuncdesc}
{
int
}{
PyTuple
_
Size
}{
PyObject *p
}
Takes a pointer to a tuple object, and returns the size
Takes a pointer to a tuple object, and returns the size
of that tuple.
of that tuple.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyTuple
_
GetItem
}{
Py
Tuple
Object *p, int pos
}
\begin{cfuncdesc}
{
PyObject*
}{
PyTuple
_
GetItem
}{
PyObject *p, int pos
}
Returns the object at position
\var
{
pos
}
in the tuple pointed
Returns the object at position
\var
{
pos
}
in the tuple pointed
to by
\var
{
p
}
. If
\var
{
pos
}
is out of bounds, returns
\NULL
{}
and
to by
\var
{
p
}
. If
\var
{
pos
}
is out of bounds, returns
\NULL
{}
and
sets an
\exception
{
IndexError
}
exception.
sets an
\exception
{
IndexError
}
exception.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyTuple
_
GET
_
ITEM
}{
Py
Tuple
Object *p, int pos
}
\begin{cfuncdesc}
{
PyObject*
}{
PyTuple
_
GET
_
ITEM
}{
PyObject *p, int pos
}
Does the same, but does no checking of its arguments.
Does the same, but does no checking of its arguments.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyTuple
_
GetSlice
}{
PyTupleObject *p,
\begin{cfuncdesc}
{
PyObject*
}{
PyTuple
_
GetSlice
}{
PyObject *p,
int low,
int low, int high
}
int high
}
Takes a slice of the tuple pointed to by
\var
{
p
}
from
Takes a slice of the tuple pointed to by
\var
{
p
}
from
\var
{
low
}
to
\var
{
high
}
and returns it as a new tuple.
\var
{
low
}
to
\var
{
high
}
and returns it as a new tuple.
\end{cfuncdesc}
\end{cfuncdesc}
...
@@ -3124,7 +3123,7 @@ should \emph{only} be used to fill in brand new tuples.
...
@@ -3124,7 +3123,7 @@ should \emph{only} be used to fill in brand new tuples.
\strong
{
Note:
}
This function ``steals'' a reference to
\var
{
o
}
.
\strong
{
Note:
}
This function ``steals'' a reference to
\var
{
o
}
.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{_
PyTuple
_
Resize
}{
Py
TupleObject
*p,
\begin{cfuncdesc}
{
int
}{_
PyTuple
_
Resize
}{
Py
Object *
*p,
int newsize, int last
_
is
_
sticky
}
int newsize, int last
_
is
_
sticky
}
Can be used to resize a tuple.
\var
{
newsize
}
will be the new length
Can be used to resize a tuple.
\var
{
newsize
}
will be the new length
of the tuple. Because tuples are
\emph
{
supposed
}
to be immutable,
of the tuple. Because tuples are
\emph
{
supposed
}
to be immutable,
...
...
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