mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Issue #17917: Use PyModule_AddIntMacro() instead of PyModule_AddIntConstant()
when applicable.
This commit is contained in:
parent
d66b10e165
commit
74ca886788
12 changed files with 681 additions and 708 deletions
|
@ -6977,7 +6977,7 @@ PyInit__ast(void)
|
|||
d = PyModule_GetDict(m);
|
||||
if (PyDict_SetItemString(d, "AST", (PyObject*)&AST_type) < 0) return
|
||||
NULL;
|
||||
if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0)
|
||||
if (PyModule_AddIntMacro(m, PyCF_ONLY_AST) < 0)
|
||||
return NULL;
|
||||
if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return
|
||||
NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue