Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8d89c2a

Browse files
committed
change AST codegen to use PyModule_AddIntMacro
1 parent 74ca886 commit 8d89c2a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Parser/asdl_c.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ def visitModule(self, mod):
10111011
self.emit("if (!m) return NULL;", 1)
10121012
self.emit("d = PyModule_GetDict(m);", 1)
10131013
self.emit('if (PyDict_SetItemString(d, "AST", (PyObject*)&AST_type) < 0) return NULL;', 1)
1014-
self.emit('if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0)', 1)
1014+
self.emit('if (PyModule_AddIntMacro(m, PyCF_ONLY_AST) < 0)', 1)
10151015
self.emit("return NULL;", 2)
10161016
for dfn in mod.dfns:
10171017
self.visit(dfn)

0 commit comments

Comments
 (0)