Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
6f290f06
Commit
6f290f06
authored
Jul 22, 2011
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hardcode the old svn __version__
parent
fcba775f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
Parser/asdl_c.py
Parser/asdl_c.py
+3
-5
No files found.
Parser/asdl_c.py
View file @
6f290f06
...
...
@@ -903,9 +903,6 @@ static int add_ast_fields(void)
self
.
emit
(
"if (!%s_singleton) return 0;"
%
cons
.
name
,
1
)
def
parse_version
(
mod
):
return
mod
.
version
.
value
[
12
:
-
3
]
class
ASTModuleVisitor
(
PickleVisitor
):
def
visitModule
(
self
,
mod
):
...
...
@@ -922,7 +919,7 @@ class ASTModuleVisitor(PickleVisitor):
self
.
emit
(
"return;"
,
2
)
# Value of version: "$Revision$"
self
.
emit
(
'if (PyModule_AddStringConstant(m, "__version__", "%s") < 0)'
%
parse_version
(
mod
)
,
1
)
%
mod
.
version
,
1
)
self
.
emit
(
"return;"
,
2
)
for
dfn
in
mod
.
dfns
:
self
.
visit
(
dfn
)
...
...
@@ -1160,6 +1157,7 @@ def main(srcfile):
argv0
=
os
.
sep
.
join
(
components
[
-
2
:])
auto_gen_msg
=
common_msg
%
argv0
mod
=
asdl
.
parse
(
srcfile
)
mod
.
version
=
"82160"
if
not
asdl
.
check
(
mod
):
sys
.
exit
(
1
)
if
INC_DIR
:
...
...
@@ -1181,7 +1179,7 @@ def main(srcfile):
p
=
os
.
path
.
join
(
SRC_DIR
,
str
(
mod
.
name
)
+
"-ast.c"
)
f
=
open
(
p
,
"wb"
)
f
.
write
(
auto_gen_msg
)
f
.
write
(
c_file_msg
%
parse_version
(
mod
)
)
f
.
write
(
c_file_msg
%
mod
.
version
)
f
.
write
(
'#include "Python.h"
\
n
'
)
f
.
write
(
'#include "%s-ast.h"
\
n
'
%
mod
.
name
)
f
.
write
(
'
\
n
'
)
...
...
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