mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Add support for version field on Modules
This commit is contained in:
parent
a7446e3438
commit
eae93b763c
3 changed files with 29 additions and 8 deletions
|
@ -524,6 +524,7 @@ 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)
|
||||
for dfn in mod.dfns:
|
||||
self.visit(dfn)
|
||||
self.emit("}", 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue