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
db107424
Commit
db107424
authored
May 31, 2018
by
Serhiy Storchaka
Committed by
GitHub
May 31, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.7] bpo-33677: Fix the signature of tp_clear handler for deque. (GH-7196). (GH-7277)
(cherry picked from commit
a5c42284
)
parent
82c456fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Modules/_collectionsmodule.c
Modules/_collectionsmodule.c
+4
-3
No files found.
Modules/_collectionsmodule.c
View file @
db107424
...
...
@@ -639,7 +639,7 @@ deque_remove(dequeobject *deque, PyObject *value)
PyDoc_STRVAR
(
remove_doc
,
"D.remove(value) -- remove first occurrence of value."
);
static
void
static
int
deque_clear
(
dequeobject
*
deque
)
{
block
*
b
;
...
...
@@ -650,7 +650,7 @@ deque_clear(dequeobject *deque)
PyObject
*
item
;
if
(
deque
->
len
==
0
)
return
;
return
0
;
/* During the process of clearing a deque, decrefs can cause the
deque to mutate. To avoid fatal confusion, we have to make the
...
...
@@ -701,7 +701,7 @@ deque_clear(dequeobject *deque)
}
assert
(
leftblock
->
rightlink
==
NULL
);
freeblock
(
leftblock
);
return
;
return
0
;
alternate_method:
while
(
deque
->
len
)
{
...
...
@@ -709,6 +709,7 @@ deque_clear(dequeobject *deque)
assert
(
item
!=
NULL
);
Py_DECREF
(
item
);
}
return
0
;
}
static
PyObject
*
...
...
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