Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
c6249a62
Kaydet (Commit)
c6249a62
authored
May 02, 2015
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Defer deleted item decref until after the deque is restored to a consistent state.
üst
1dd8e71e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
NEWS
Misc/NEWS
+4
-0
_collectionsmodule.c
Modules/_collectionsmodule.c
+6
-6
No files found.
Misc/NEWS
Dosyayı görüntüle @
c6249a62
...
@@ -45,6 +45,10 @@ Library
...
@@ -45,6 +45,10 @@ Library
- Issues #24099, #24100, and #24101: Fix free-after-use bug in heapq'
s
siftup
- Issues #24099, #24100, and #24101: Fix free-after-use bug in heapq'
s
siftup
and
siftdown
functions
.
and
siftdown
functions
.
-
Backport
collections
.
deque
fixes
from
Python
3.5
.
Prevents
reentrant
badness
during
deletion
by
deferring
the
decref
until
the
container
has
been
restored
to
a
consistent
state
.
-
Issue
#
23008
:
Fixed
resolving
attributes
with
boolean
value
is
False
in
pydoc
.
-
Issue
#
23008
:
Fixed
resolving
attributes
with
boolean
value
is
False
in
pydoc
.
-
Fix
asyncio
issue
235
:
LifoQueue
and
PriorityQueue
's put didn'
t
-
Fix
asyncio
issue
235
:
LifoQueue
and
PriorityQueue
's put didn'
t
...
...
Modules/_collectionsmodule.c
Dosyayı görüntüle @
c6249a62
...
@@ -698,9 +698,9 @@ deque_remove(dequeobject *deque, PyObject *value)
...
@@ -698,9 +698,9 @@ deque_remove(dequeobject *deque, PyObject *value)
if
(
cmp
>
0
)
{
if
(
cmp
>
0
)
{
PyObject
*
tgt
=
deque_popleft
(
deque
,
NULL
);
PyObject
*
tgt
=
deque_popleft
(
deque
,
NULL
);
assert
(
tgt
!=
NULL
);
assert
(
tgt
!=
NULL
);
Py_DECREF
(
tgt
);
if
(
_deque_rotate
(
deque
,
i
))
if
(
_deque_rotate
(
deque
,
i
)
==
-
1
)
return
NULL
;
return
NULL
;
Py_DECREF
(
tgt
);
Py_RETURN_NONE
;
Py_RETURN_NONE
;
}
}
else
if
(
cmp
<
0
)
{
else
if
(
cmp
<
0
)
{
...
@@ -781,16 +781,16 @@ static int
...
@@ -781,16 +781,16 @@ static int
deque_del_item
(
dequeobject
*
deque
,
Py_ssize_t
i
)
deque_del_item
(
dequeobject
*
deque
,
Py_ssize_t
i
)
{
{
PyObject
*
item
;
PyObject
*
item
;
int
rv
;
assert
(
i
>=
0
&&
i
<
Py_SIZE
(
deque
));
assert
(
i
>=
0
&&
i
<
Py_SIZE
(
deque
));
if
(
_deque_rotate
(
deque
,
-
i
)
==
-
1
)
if
(
_deque_rotate
(
deque
,
-
i
))
return
-
1
;
return
-
1
;
item
=
deque_popleft
(
deque
,
NULL
);
item
=
deque_popleft
(
deque
,
NULL
);
rv
=
_deque_rotate
(
deque
,
i
);
assert
(
item
!=
NULL
);
assert
(
item
!=
NULL
);
Py_DECREF
(
item
);
Py_DECREF
(
item
);
return
rv
;
return
_deque_rotate
(
deque
,
i
);
}
}
static
int
static
int
...
...
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