Mercurial > cpython-lru_cache-weakref
comparison Python/Python-ast.c @ 83867:12cbb5183d98
Issue #17917: Use PyModule_AddIntMacro() instead of PyModule_AddIntConstant()
when applicable.
| author | Charles-Francois Natali <cf.natali@gmail.com> |
|---|---|
| date | Mon, 20 May 2013 19:13:19 +0200 |
| parents | cc7a94efb1b7 |
| children | cf8f42eadbd0 |
comparison
equal
deleted
inserted
replaced
| 83866:9cfaefa58bdc | 83867:12cbb5183d98 |
|---|---|
| 6975 m = PyModule_Create(&_astmodule); | 6975 m = PyModule_Create(&_astmodule); |
| 6976 if (!m) return NULL; | 6976 if (!m) return NULL; |
| 6977 d = PyModule_GetDict(m); | 6977 d = PyModule_GetDict(m); |
| 6978 if (PyDict_SetItemString(d, "AST", (PyObject*)&AST_type) < 0) return | 6978 if (PyDict_SetItemString(d, "AST", (PyObject*)&AST_type) < 0) return |
| 6979 NULL; | 6979 NULL; |
| 6980 if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0) | 6980 if (PyModule_AddIntMacro(m, PyCF_ONLY_AST) < 0) |
| 6981 return NULL; | 6981 return NULL; |
| 6982 if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return | 6982 if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return |
| 6983 NULL; | 6983 NULL; |
| 6984 if (PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0) | 6984 if (PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0) |
| 6985 return NULL; | 6985 return NULL; |
