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
d9920c25
Kaydet (Commit)
d9920c25
authored
Haz 21, 2009
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
remove tmpname support since it's no longer used
üst
f67caf85
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
30 deletions
+0
-30
symtable.h
Include/symtable.h
+0
-2
compile.c
Python/compile.c
+0
-2
symtable.c
Python/symtable.c
+0
-26
No files found.
Include/symtable.h
Dosyayı görüntüle @
d9920c25
...
...
@@ -19,7 +19,6 @@ struct symtable {
PyObject
*
st_global
;
/* borrowed ref to MODULE in st_symbols */
int
st_nblocks
;
/* number of blocks */
PyObject
*
st_private
;
/* name of current class or NULL */
int
st_tmpname
;
/* temporary name counter */
PyFutureFeatures
*
st_future
;
/* module's future features */
};
...
...
@@ -43,7 +42,6 @@ typedef struct _symtable_entry {
an argument */
int
ste_lineno
;
/* first line of block */
int
ste_opt_lineno
;
/* lineno of last exec or import * */
int
ste_tmpname
;
/* counter for listcomp temp vars */
struct
symtable
*
ste_table
;
}
PySTEntryObject
;
...
...
Python/compile.c
Dosyayı görüntüle @
d9920c25
...
...
@@ -111,7 +111,6 @@ struct compiler_unit {
members, you can reach all early allocated blocks. */
basicblock
*
u_blocks
;
basicblock
*
u_curblock
;
/* pointer to current block */
int
u_tmpname
;
/* temporary variables for list comps */
int
u_nfblocks
;
struct
fblockinfo
u_fblock
[
CO_MAXBLOCKS
];
...
...
@@ -468,7 +467,6 @@ compiler_enter_scope(struct compiler *c, identifier name, void *key,
}
u
->
u_blocks
=
NULL
;
u
->
u_tmpname
=
0
;
u
->
u_nfblocks
=
0
;
u
->
u_firstlineno
=
lineno
;
u
->
u_lineno
=
0
;
...
...
Python/symtable.c
Dosyayı görüntüle @
d9920c25
...
...
@@ -32,7 +32,6 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block,
goto
fail
;
ste
->
ste_table
=
st
;
ste
->
ste_id
=
k
;
ste
->
ste_tmpname
=
0
;
ste
->
ste_name
=
name
;
Py_INCREF
(
name
);
...
...
@@ -60,7 +59,6 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block,
ste
->
ste_varargs
=
0
;
ste
->
ste_varkeywords
=
0
;
ste
->
ste_opt_lineno
=
0
;
ste
->
ste_tmpname
=
0
;
ste
->
ste_lineno
=
lineno
;
if
(
st
->
st_cur
!=
NULL
&&
...
...
@@ -204,7 +202,6 @@ symtable_new(void)
if
((
st
->
st_symbols
=
PyDict_New
())
==
NULL
)
goto
fail
;
st
->
st_cur
=
NULL
;
st
->
st_tmpname
=
0
;
st
->
st_private
=
NULL
;
return
st
;
fail:
...
...
@@ -994,23 +991,6 @@ error:
} \
}
static
int
symtable_new_tmpname
(
struct
symtable
*
st
)
{
char
tmpname
[
256
];
identifier
tmp
;
PyOS_snprintf
(
tmpname
,
sizeof
(
tmpname
),
"_[%d]"
,
++
st
->
st_cur
->
ste_tmpname
);
tmp
=
PyString_InternFromString
(
tmpname
);
if
(
!
tmp
)
return
0
;
if
(
!
symtable_add_def
(
st
,
tmp
,
DEF_LOCAL
))
return
0
;
Py_DECREF
(
tmp
);
return
1
;
}
static
int
symtable_visit_stmt
(
struct
symtable
*
st
,
stmt_ty
s
)
{
...
...
@@ -1184,12 +1164,8 @@ symtable_visit_stmt(struct symtable *st, stmt_ty s)
/* nothing to do here */
break
;
case
With_kind
:
if
(
!
symtable_new_tmpname
(
st
))
return
0
;
VISIT
(
st
,
expr
,
s
->
v
.
With
.
context_expr
);
if
(
s
->
v
.
With
.
optional_vars
)
{
if
(
!
symtable_new_tmpname
(
st
))
return
0
;
VISIT
(
st
,
expr
,
s
->
v
.
With
.
optional_vars
);
}
VISIT_SEQ
(
st
,
stmt
,
s
->
v
.
With
.
body
);
...
...
@@ -1237,8 +1213,6 @@ symtable_visit_expr(struct symtable *st, expr_ty e)
VISIT_SEQ
(
st
,
expr
,
e
->
v
.
Dict
.
values
);
break
;
case
ListComp_kind
:
if
(
!
symtable_new_tmpname
(
st
))
return
0
;
VISIT
(
st
,
expr
,
e
->
v
.
ListComp
.
elt
);
VISIT_SEQ
(
st
,
comprehension
,
e
->
v
.
ListComp
.
generators
);
break
;
...
...
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