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
d8f65973
Kaydet (Commit)
d8f65973
authored
Kas 20, 2010
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
new plan: functions that want 'tmp' can declare it
üst
b304d0b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
23 deletions
+6
-23
asdl_c.py
Parser/asdl_c.py
+1
-3
Python-ast.c
Python/Python-ast.c
+5
-20
No files found.
Parser/asdl_c.py
Dosyayı görüntüle @
d8f65973
...
...
@@ -365,10 +365,7 @@ class Obj2ModVisitor(PickleVisitor):
self
.
emit
(
"int"
,
0
)
self
.
emit
(
"obj2ast_
%
s(PyObject* obj,
%
s* out, PyArena* arena)"
%
(
name
,
ctype
),
0
)
self
.
emit
(
"{"
,
0
)
self
.
emit
(
"PyObject* tmp = NULL;"
,
1
)
self
.
emit
(
"int isinstance;"
,
1
)
# Prevent compiler warnings about unused variable.
self
.
emit
(
"tmp = tmp;"
,
1
)
self
.
emit
(
""
,
0
)
def
sumTrailer
(
self
,
name
,
add_label
=
False
):
...
...
@@ -403,6 +400,7 @@ class Obj2ModVisitor(PickleVisitor):
def
complexSum
(
self
,
sum
,
name
):
self
.
funcHeader
(
name
)
self
.
emit
(
"PyObject *tmp = NULL;"
,
1
)
for
a
in
sum
.
attributes
:
self
.
visitAttributeDeclaration
(
a
,
name
,
sum
=
sum
)
self
.
emit
(
""
,
0
)
...
...
Python/Python-ast.c
Dosyayı görüntüle @
d8f65973
...
...
@@ -3374,10 +3374,9 @@ failed:
int
obj2ast_mod
(
PyObject
*
obj
,
mod_ty
*
out
,
PyArena
*
arena
)
{
PyObject
*
tmp
=
NULL
;
int
isinstance
;
tmp
=
tmp
;
PyObject
*
tmp
=
NULL
;
if
(
obj
==
Py_None
)
{
*
out
=
NULL
;
...
...
@@ -3523,10 +3522,9 @@ obj2ast_mod(PyObject* obj, mod_ty* out, PyArena* arena)
int
obj2ast_stmt
(
PyObject
*
obj
,
stmt_ty
*
out
,
PyArena
*
arena
)
{
PyObject
*
tmp
=
NULL
;
int
isinstance
;
tmp
=
tmp
;
PyObject
*
tmp
=
NULL
;
int
lineno
;
int
col_offset
;
...
...
@@ -4719,10 +4717,9 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
int
obj2ast_expr
(
PyObject
*
obj
,
expr_ty
*
out
,
PyArena
*
arena
)
{
PyObject
*
tmp
=
NULL
;
int
isinstance
;
tmp
=
tmp
;
PyObject
*
tmp
=
NULL
;
int
lineno
;
int
col_offset
;
...
...
@@ -5835,9 +5832,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
int
obj2ast_expr_context
(
PyObject
*
obj
,
expr_context_ty
*
out
,
PyArena
*
arena
)
{
PyObject
*
tmp
=
NULL
;
int
isinstance
;
tmp
=
tmp
;
isinstance
=
PyObject_IsInstance
(
obj
,
(
PyObject
*
)
Load_type
);
if
(
isinstance
==
-
1
)
{
...
...
@@ -5895,10 +5890,9 @@ obj2ast_expr_context(PyObject* obj, expr_context_ty* out, PyArena* arena)
int
obj2ast_slice
(
PyObject
*
obj
,
slice_ty
*
out
,
PyArena
*
arena
)
{
PyObject
*
tmp
=
NULL
;
int
isinstance
;
tmp
=
tmp
;
PyObject
*
tmp
=
NULL
;
if
(
obj
==
Py_None
)
{
*
out
=
NULL
;
...
...
@@ -6018,9 +6012,7 @@ obj2ast_slice(PyObject* obj, slice_ty* out, PyArena* arena)
int
obj2ast_boolop
(
PyObject
*
obj
,
boolop_ty
*
out
,
PyArena
*
arena
)
{
PyObject
*
tmp
=
NULL
;
int
isinstance
;
tmp
=
tmp
;
isinstance
=
PyObject_IsInstance
(
obj
,
(
PyObject
*
)
And_type
);
if
(
isinstance
==
-
1
)
{
...
...
@@ -6046,9 +6038,7 @@ obj2ast_boolop(PyObject* obj, boolop_ty* out, PyArena* arena)
int
obj2ast_operator
(
PyObject
*
obj
,
operator_ty
*
out
,
PyArena
*
arena
)
{
PyObject
*
tmp
=
NULL
;
int
isinstance
;
tmp
=
tmp
;
isinstance
=
PyObject_IsInstance
(
obj
,
(
PyObject
*
)
Add_type
);
if
(
isinstance
==
-
1
)
{
...
...
@@ -6154,9 +6144,7 @@ obj2ast_operator(PyObject* obj, operator_ty* out, PyArena* arena)
int
obj2ast_unaryop
(
PyObject
*
obj
,
unaryop_ty
*
out
,
PyArena
*
arena
)
{
PyObject
*
tmp
=
NULL
;
int
isinstance
;
tmp
=
tmp
;
isinstance
=
PyObject_IsInstance
(
obj
,
(
PyObject
*
)
Invert_type
);
if
(
isinstance
==
-
1
)
{
...
...
@@ -6198,9 +6186,7 @@ obj2ast_unaryop(PyObject* obj, unaryop_ty* out, PyArena* arena)
int
obj2ast_cmpop
(
PyObject
*
obj
,
cmpop_ty
*
out
,
PyArena
*
arena
)
{
PyObject
*
tmp
=
NULL
;
int
isinstance
;
tmp
=
tmp
;
isinstance
=
PyObject_IsInstance
(
obj
,
(
PyObject
*
)
Eq_type
);
if
(
isinstance
==
-
1
)
{
...
...
@@ -6354,10 +6340,9 @@ failed:
int
obj2ast_excepthandler
(
PyObject
*
obj
,
excepthandler_ty
*
out
,
PyArena
*
arena
)
{
PyObject
*
tmp
=
NULL
;
int
isinstance
;
tmp
=
tmp
;
PyObject
*
tmp
=
NULL
;
int
lineno
;
int
col_offset
;
...
...
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