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
d8768d32
Kaydet (Commit)
d8768d32
authored
Eki 01, 2004
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Document some reverse-engineered invariants and pragmatic hints.
üst
e644a1b9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
collectionsmodule.c
Modules/collectionsmodule.c
+17
-2
No files found.
Modules/collectionsmodule.c
Dosyayı görüntüle @
d8768d32
...
...
@@ -9,6 +9,21 @@
#define BLOCKLEN 46
/* A `dequeobject` is composed of a doubly-linked list of `block` nodes.
* This list is not circular (the leftmost block has leftlink==NULL,
* and the rightmost block has rightlink==NULL). A deque d's first
* element is at d.leftblock[leftindex] and its last element is at
* d.rightblock[rightindex]; note that, unlike as for Python slice
* indices, this indices are inclusive on both ends.
* The list of blocks is never empty. An empty deque d has
* d.leftblock == d.rightblock != NULL; d.len == 0; and
* d.leftindex > d.rightindex; checking for d.len == 0 is the intended
* way to see whether d is empty.
* Note that since d.leftindex and d.rightindex may be indices into
* distinct blocks (and certainly are, for and d with len(d) > BLOCKLEN),
* it's not generally true that d.leftindex <= d.rightindex.
*/
typedef
struct
BLOCK
{
struct
BLOCK
*
leftlink
;
struct
BLOCK
*
rightlink
;
...
...
@@ -31,8 +46,8 @@ typedef struct {
PyObject_HEAD
block
*
leftblock
;
block
*
rightblock
;
int
leftindex
;
int
rightindex
;
int
leftindex
;
/* in range(BLOCKLEN) */
int
rightindex
;
/* in range(BLOCKLEN) */
int
len
;
PyObject
*
weakreflist
;
/* List of weak references */
}
dequeobject
;
...
...
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