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
5a3f49bb
Kaydet (Commit)
5a3f49bb
authored
Agu 11, 2011
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
revert code which conditionally writes Python-ast.h (closes #12727)
üst
f0dda5f8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
23 deletions
+3
-23
asdl_c.py
Parser/asdl_c.py
+3
-23
No files found.
Parser/asdl_c.py
Dosyayı görüntüle @
5a3f49bb
...
@@ -4,10 +4,7 @@
...
@@ -4,10 +4,7 @@
# TO DO
# TO DO
# handle fields that have a type but no name
# handle fields that have a type but no name
import
errno
import
os
,
sys
import
os
import
sys
import
StringIO
import
subprocess
import
subprocess
import
asdl
import
asdl
...
@@ -1158,7 +1155,7 @@ def main(srcfile):
...
@@ -1158,7 +1155,7 @@ def main(srcfile):
sys
.
exit
(
1
)
sys
.
exit
(
1
)
if
INC_DIR
:
if
INC_DIR
:
p
=
"
%
s/
%
s-ast.h"
%
(
INC_DIR
,
mod
.
name
)
p
=
"
%
s/
%
s-ast.h"
%
(
INC_DIR
,
mod
.
name
)
f
=
StringIO
.
StringIO
(
)
f
=
open
(
p
,
"w"
)
f
.
write
(
auto_gen_msg
)
f
.
write
(
auto_gen_msg
)
f
.
write
(
'#include "asdl.h"
\n\n
'
)
f
.
write
(
'#include "asdl.h"
\n\n
'
)
c
=
ChainOfVisitors
(
TypeDefVisitor
(
f
),
c
=
ChainOfVisitors
(
TypeDefVisitor
(
f
),
...
@@ -1169,24 +1166,7 @@ def main(srcfile):
...
@@ -1169,24 +1166,7 @@ def main(srcfile):
f
.
write
(
"PyObject* PyAST_mod2obj(mod_ty t);
\n
"
)
f
.
write
(
"PyObject* PyAST_mod2obj(mod_ty t);
\n
"
)
f
.
write
(
"mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode);
\n
"
)
f
.
write
(
"mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena, int mode);
\n
"
)
f
.
write
(
"int PyAST_Check(PyObject* obj);
\n
"
)
f
.
write
(
"int PyAST_Check(PyObject* obj);
\n
"
)
s
=
f
.
getvalue
()
f
.
close
()
write
=
True
try
:
fp
=
open
(
p
,
"r"
)
except
IOError
,
e
:
if
e
.
errno
!=
errno
.
ENOENT
:
raise
else
:
try
:
write
=
fp
.
read
()
!=
s
finally
:
fp
.
close
()
if
write
:
fp
=
open
(
p
,
"w"
)
try
:
fp
.
write
(
s
)
finally
:
fp
.
close
()
if
SRC_DIR
:
if
SRC_DIR
:
p
=
os
.
path
.
join
(
SRC_DIR
,
str
(
mod
.
name
)
+
"-ast.c"
)
p
=
os
.
path
.
join
(
SRC_DIR
,
str
(
mod
.
name
)
+
"-ast.c"
)
...
...
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