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
fbb8b86d
Commit
fbb8b86d
authored
May 22, 2003
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use macro to get length of list.
Remove comment about how code used to work.
parent
4b6970eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
Python/compile.c
Python/compile.c
+2
-8
No files found.
Python/compile.c
View file @
fbb8b86d
...
...
@@ -4967,15 +4967,9 @@ symtable_update_free_vars(struct symtable *st)
for
(
i
=
0
;
i
<
PyList_GET_SIZE
(
ste
->
ste_children
);
++
i
)
{
int
pos
=
0
;
if
(
list
)
if
(
PyList_SetSlice
(
list
,
0
,
((
PyVarObject
*
)
list
)
->
ob_size
,
0
)
<
0
)
if
(
list
&&
PyList_SetSlice
(
list
,
0
,
PyList_GET_SIZE
(
list
),
0
)
<
0
)
return
-
1
;
/* Yes, the above call CAN fail, even though it's reducing
the size of the list. The current implementation will
allocate temp memory equal to the size of the list: this
is avoidable in this specific case, but probably not
worth the effort of special-casing it. - JRH */
child
=
(
PySymtableEntryObject
*
)
PyList_GET_ITEM
(
ste
->
ste_children
,
i
);
while
(
PyDict_Next
(
child
->
ste_symbols
,
&
pos
,
&
name
,
&
o
))
{
...
...
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