summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-02-28 00:30:54 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-02-28 00:30:54 (GMT)
commit40d8459dbfbe2e2fbd2071a101edf0d47d668901 (patch)
treeb3e7d018b1e4f588ac8988c5c1eca7aa57a9a6f3 /Parser
parent17e59053fdb04548fb306c786a25873eb8ac4f50 (diff)
downloadcpython-40d8459dbfbe2e2fbd2071a101edf0d47d668901.zip
cpython-40d8459dbfbe2e2fbd2071a101edf0d47d668901.tar.gz
cpython-40d8459dbfbe2e2fbd2071a101edf0d47d668901.tar.bz2
Add generation of the version.
Diffstat (limited to 'Parser')
-rwxr-xr-xParser/asdl_c.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py
index 3f62af3..b55b6eb 100755
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -524,7 +524,8 @@ class ASTModuleVisitor(PickleVisitor):
self.emit('if (PyDict_SetItemString(d, "AST", (PyObject*)AST_type) < 0) return;', 1)
self.emit('if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0)', 1)
self.emit("return;", 2)
- self.emit("/* %s */" % mod.version.value, 1)
+ # Value of version: "$Revision$"
+ self.emit('if (PyModule_AddStringConstant(m, "__version__", "%s") < 0)' % mod.version.value[12:-3], 1)
for dfn in mod.dfns:
self.visit(dfn)
self.emit("}", 0)