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
59cf23ab
Kaydet (Commit)
59cf23ab
authored
Şub 07, 2013
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Minor tweaks to varnames, declarations, and comments.
üst
09f336ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
_collectionsmodule.c
Modules/_collectionsmodule.c
+7
-8
No files found.
Modules/_collectionsmodule.c
Dosyayı görüntüle @
59cf23ab
...
...
@@ -9,7 +9,7 @@
/* The block length may be set to any number over 1. Larger numbers
* reduce the number of calls to the memory allocator but take more
* memory. Ideally,
BLOCKLEN
should be set to a multiple of the
* memory. Ideally,
(BLOCKLEN+2)
should be set to a multiple of the
* length of a cache line.
*/
...
...
@@ -71,7 +71,7 @@ newblock(block *leftlink, block *rightlink, Py_ssize_t len) {
return
NULL
;
}
if
(
numfreeblocks
)
{
numfreeblocks
-=
1
;
numfreeblocks
--
;
b
=
freeblocks
[
numfreeblocks
];
}
else
{
b
=
PyMem_Malloc
(
sizeof
(
block
));
...
...
@@ -414,7 +414,6 @@ static int
_deque_rotate
(
dequeobject
*
deque
,
Py_ssize_t
n
)
{
Py_ssize_t
m
,
len
=
deque
->
len
,
halflen
=
len
>>
1
;
block
*
prevblock
;
if
(
len
<=
1
)
return
0
;
...
...
@@ -455,8 +454,8 @@ _deque_rotate(dequeobject *deque, Py_ssize_t n)
n
-=
m
;
if
(
deque
->
rightindex
==
-
1
)
{
block
*
prevblock
=
deque
->
rightblock
->
leftlink
;
assert
(
deque
->
rightblock
!=
NULL
);
prevblock
=
deque
->
rightblock
->
leftlink
;
assert
(
deque
->
leftblock
!=
deque
->
rightblock
);
freeblock
(
deque
->
rightblock
);
prevblock
->
rightlink
=
NULL
;
...
...
@@ -490,12 +489,12 @@ _deque_rotate(dequeobject *deque, Py_ssize_t n)
n
+=
m
;
if
(
deque
->
leftindex
==
BLOCKLEN
)
{
block
*
nextblock
=
deque
->
leftblock
->
rightlink
;
assert
(
deque
->
leftblock
!=
deque
->
rightblock
);
prevblock
=
deque
->
leftblock
->
rightlink
;
freeblock
(
deque
->
leftblock
);
assert
(
prev
block
!=
NULL
);
prev
block
->
leftlink
=
NULL
;
deque
->
leftblock
=
prev
block
;
assert
(
next
block
!=
NULL
);
next
block
->
leftlink
=
NULL
;
deque
->
leftblock
=
next
block
;
deque
->
leftindex
=
0
;
}
}
...
...
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