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
6c7a00fb
Kaydet (Commit)
6c7a00fb
authored
Haz 12, 2004
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
* Factor out PyObject_SelfIter().
* Change a XDECREF to DECREF (adding an assertion just to be sure).
üst
0eb32a65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
genobject.c
Objects/genobject.c
+3
-9
No files found.
Objects/genobject.c
Dosyayı görüntüle @
6c7a00fb
...
@@ -50,7 +50,8 @@ gen_iternext(PyGenObject *gen)
...
@@ -50,7 +50,8 @@ gen_iternext(PyGenObject *gen)
/* Don't keep the reference to f_back any longer than necessary. It
/* Don't keep the reference to f_back any longer than necessary. It
* may keep a chain of frames alive or it could create a reference
* may keep a chain of frames alive or it could create a reference
* cycle. */
* cycle. */
Py_XDECREF
(
f
->
f_back
);
assert
(
f
->
f_back
!=
NULL
);
Py_DECREF
(
f
->
f_back
);
f
->
f_back
=
NULL
;
f
->
f_back
=
NULL
;
/* If the generator just returned (as opposed to yielding), signal
/* If the generator just returned (as opposed to yielding), signal
...
@@ -63,13 +64,6 @@ gen_iternext(PyGenObject *gen)
...
@@ -63,13 +64,6 @@ gen_iternext(PyGenObject *gen)
return
result
;
return
result
;
}
}
static
PyObject
*
gen_getiter
(
PyObject
*
gen
)
{
Py_INCREF
(
gen
);
return
gen
;
}
static
PyMemberDef
gen_memberlist
[]
=
{
static
PyMemberDef
gen_memberlist
[]
=
{
{
"gi_frame"
,
T_OBJECT
,
offsetof
(
PyGenObject
,
gi_frame
),
RO
},
{
"gi_frame"
,
T_OBJECT
,
offsetof
(
PyGenObject
,
gi_frame
),
RO
},
{
"gi_running"
,
T_INT
,
offsetof
(
PyGenObject
,
gi_running
),
RO
},
{
"gi_running"
,
T_INT
,
offsetof
(
PyGenObject
,
gi_running
),
RO
},
...
@@ -104,7 +98,7 @@ PyTypeObject PyGen_Type = {
...
@@ -104,7 +98,7 @@ PyTypeObject PyGen_Type = {
0
,
/* tp_clear */
0
,
/* tp_clear */
0
,
/* tp_richcompare */
0
,
/* tp_richcompare */
offsetof
(
PyGenObject
,
gi_weakreflist
),
/* tp_weaklistoffset */
offsetof
(
PyGenObject
,
gi_weakreflist
),
/* tp_weaklistoffset */
(
getiterfunc
)
gen_getiter
,
/* tp_iter */
PyObject_SelfIter
,
/* tp_iter */
(
iternextfunc
)
gen_iternext
,
/* tp_iternext */
(
iternextfunc
)
gen_iternext
,
/* tp_iternext */
0
,
/* tp_methods */
0
,
/* tp_methods */
gen_memberlist
,
/* tp_members */
gen_memberlist
,
/* tp_members */
...
...
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