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
a937d148
Commit
a937d148
authored
Apr 24, 1998
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fred's right -- we need PyList_SET_ITEM().
parent
7b7a2c2e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
1 deletion
+12
-1
Doc/api.tex
Doc/api.tex
+5
-0
Doc/api/api.tex
Doc/api/api.tex
+5
-0
Include/listobject.h
Include/listobject.h
+1
-0
Python/bltinmodule.c
Python/bltinmodule.c
+1
-1
No files found.
Doc/api.tex
View file @
a937d148
...
...
@@ -1953,6 +1953,11 @@ Returns a new tuple object containing the contents of \var{list}.
Macro form of
\cfunction
{
PyList
_
GetItem()
}
without error checking.
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
SET
_
ITEM
}{
PyObject *list, int i,
PyObject *o
}
Macro form of
\cfunction
{
PyList
_
SetItem()
}
without error checking.
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyList
_
GET
_
SIZE
}{
PyObject *list
}
Macro form of
\cfunction
{
PyList
_
GetSize()
}
without error checking.
\end{cfuncdesc}
...
...
Doc/api/api.tex
View file @
a937d148
...
...
@@ -1953,6 +1953,11 @@ Returns a new tuple object containing the contents of \var{list}.
Macro form of
\cfunction
{
PyList
_
GetItem()
}
without error checking.
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PyList
_
SET
_
ITEM
}{
PyObject *list, int i,
PyObject *o
}
Macro form of
\cfunction
{
PyList
_
SetItem()
}
without error checking.
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyList
_
GET
_
SIZE
}{
PyObject *list
}
Macro form of
\cfunction
{
PyList
_
GetSize()
}
without error checking.
\end{cfuncdesc}
...
...
Include/listobject.h
View file @
a937d148
...
...
@@ -74,6 +74,7 @@ extern PyObject *PyList_AsTuple Py_PROTO((PyObject *));
/* Macro, trading safety for speed */
#define PyList_GET_ITEM(op, i) (((PyListObject *)(op))->ob_item[i])
#define PyList_SET_ITEM(op, i, v) (((PyListObject *)(op))->ob_item[i] = (v))
#define PyList_GET_SIZE(op) (((PyListObject *)(op))->ob_size)
#ifdef __cplusplus
...
...
Python/bltinmodule.c
View file @
a937d148
...
...
@@ -1282,7 +1282,7 @@ builtin_range(self, args)
Py_DECREF
(
v
);
return
NULL
;
}
PyList_
GET_ITEM
(
v
,
i
)
=
w
;
PyList_
SET_ITEM
(
v
,
i
,
w
)
;
ilow
+=
istep
;
}
return
v
;
...
...
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