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
609da58a
Kaydet (Commit)
609da58a
authored
Haz 30, 2011
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
store the current scope on the stack right away
üst
0aafa4f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
21 deletions
+18
-21
symtable.c
Python/symtable.c
+18
-21
No files found.
Python/symtable.c
Dosyayı görüntüle @
609da58a
...
@@ -899,17 +899,14 @@ symtable_warn(struct symtable *st, char *msg, int lineno)
...
@@ -899,17 +899,14 @@ symtable_warn(struct symtable *st, char *msg, int lineno)
static
int
static
int
symtable_exit_block
(
struct
symtable
*
st
,
void
*
ast
)
symtable_exit_block
(
struct
symtable
*
st
,
void
*
ast
)
{
{
Py_ssize_t
end
;
Py_ssize_t
size
;
Py_CLEAR
(
st
->
st_cur
)
;
st
->
st_cur
=
NULL
;
end
=
PyList_GET_SIZE
(
st
->
st_stack
)
-
1
;
size
=
PyList_GET_SIZE
(
st
->
st_stack
)
;
if
(
end
>=
0
)
{
if
(
size
)
{
st
->
st_cur
=
(
PySTEntryObject
*
)
PyList_GET_ITEM
(
st
->
st_stack
,
st
->
st_cur
=
(
PySTEntryObject
*
)
PyList_GET_ITEM
(
st
->
st_stack
,
end
);
size
-
2
);
if
(
st
->
st_cur
==
NULL
)
if
(
PyList_SetSlice
(
st
->
st_stack
,
size
-
1
,
size
,
NULL
)
<
0
)
return
0
;
Py_INCREF
(
st
->
st_cur
);
if
(
PySequence_DelItem
(
st
->
st_stack
,
end
)
<
0
)
return
0
;
return
0
;
}
}
return
1
;
return
1
;
...
@@ -919,23 +916,23 @@ static int
...
@@ -919,23 +916,23 @@ static int
symtable_enter_block
(
struct
symtable
*
st
,
identifier
name
,
_Py_block_ty
block
,
symtable_enter_block
(
struct
symtable
*
st
,
identifier
name
,
_Py_block_ty
block
,
void
*
ast
,
int
lineno
,
int
col_offset
)
void
*
ast
,
int
lineno
,
int
col_offset
)
{
{
PySTEntryObject
*
prev
=
NULL
;
PySTEntryObject
*
prev
=
NULL
,
*
ste
;
if
(
st
->
st_cur
)
{
ste
=
ste_new
(
st
,
name
,
block
,
ast
,
lineno
,
col_offset
);
prev
=
st
->
st_cur
;
if
(
ste
==
NULL
)
if
(
PyList_Append
(
st
->
st_stack
,
(
PyObject
*
)
st
->
st_cur
)
<
0
)
{
return
0
;
}
Py_DECREF
(
st
->
st_cur
);
}
st
->
st_cur
=
ste_new
(
st
,
name
,
block
,
ast
,
lineno
,
col_offset
);
if
(
st
->
st_cur
==
NULL
)
return
0
;
return
0
;
if
(
PyList_Append
(
st
->
st_stack
,
(
PyObject
*
)
ste
)
<
0
)
{
Py_DECREF
(
ste
);
return
0
;
}
prev
=
st
->
st_cur
;
/* The entry is owned by the stack. Borrow it for st_cur. */
Py_DECREF
(
ste
);
st
->
st_cur
=
ste
;
if
(
block
==
ModuleBlock
)
if
(
block
==
ModuleBlock
)
st
->
st_global
=
st
->
st_cur
->
ste_symbols
;
st
->
st_global
=
st
->
st_cur
->
ste_symbols
;
if
(
prev
)
{
if
(
prev
)
{
if
(
PyList_Append
(
prev
->
ste_children
,
if
(
PyList_Append
(
prev
->
ste_children
,
(
PyObject
*
)
ste
)
<
0
)
{
(
PyObject
*
)
st
->
st_cur
)
<
0
)
{
return
0
;
return
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