Mercurial > cpython-lru_cache-weakref
comparison Python/Python-ast.c @ 40941:2ca14d6a369b
Whoops, fix build breakage. There were still a few uses of the bool type.
Remove the last few uses of bool/true/false.
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Mon, 26 Feb 2007 19:14:12 +0000 |
| parents | 6aa1be5dd009 |
| children | 30e5cb3a55ac |
comparison
equal
deleted
inserted
replaced
| 40940:1853cf06e36b | 40941:2ca14d6a369b |
|---|---|
| 1 /* File automatically generated by Parser/asdl_c.py. */ | 1 /* File automatically generated by Parser/asdl_c.py. */ |
| 2 | 2 |
| 3 | 3 |
| 4 /* | 4 /* |
| 5 __version__ 53873. | 5 __version__ 53956. |
| 6 | 6 |
| 7 This module must be committed separately after each AST grammar change; | 7 This module must be committed separately after each AST grammar change; |
| 8 The __version__ number is set to the revision number of the commit | 8 The __version__ number is set to the revision number of the commit |
| 9 containing the grammar change. | 9 containing the grammar change. |
| 10 */ | 10 */ |
| 441 Py_INCREF((PyObject*)o); | 441 Py_INCREF((PyObject*)o); |
| 442 return (PyObject*)o; | 442 return (PyObject*)o; |
| 443 } | 443 } |
| 444 #define ast2obj_identifier ast2obj_object | 444 #define ast2obj_identifier ast2obj_object |
| 445 #define ast2obj_string ast2obj_object | 445 #define ast2obj_string ast2obj_object |
| 446 static PyObject* ast2obj_bool(bool b) | |
| 447 { | |
| 448 return PyBool_FromLong(b); | |
| 449 } | |
| 450 | 446 |
| 451 static PyObject* ast2obj_int(long b) | 447 static PyObject* ast2obj_int(long b) |
| 452 { | 448 { |
| 453 return PyInt_FromLong(b); | 449 return PyInt_FromLong(b); |
| 454 } | 450 } |
| 3011 if (!m) return; | 3007 if (!m) return; |
| 3012 d = PyModule_GetDict(m); | 3008 d = PyModule_GetDict(m); |
| 3013 if (PyDict_SetItemString(d, "AST", (PyObject*)AST_type) < 0) return; | 3009 if (PyDict_SetItemString(d, "AST", (PyObject*)AST_type) < 0) return; |
| 3014 if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0) | 3010 if (PyModule_AddIntConstant(m, "PyCF_ONLY_AST", PyCF_ONLY_AST) < 0) |
| 3015 return; | 3011 return; |
| 3016 if (PyModule_AddStringConstant(m, "__version__", "53873") < 0) | 3012 if (PyModule_AddStringConstant(m, "__version__", "53956") < 0) |
| 3017 return; | 3013 return; |
| 3018 if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return; | 3014 if (PyDict_SetItemString(d, "mod", (PyObject*)mod_type) < 0) return; |
| 3019 if (PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0) | 3015 if (PyDict_SetItemString(d, "Module", (PyObject*)Module_type) < 0) |
| 3020 return; | 3016 return; |
| 3021 if (PyDict_SetItemString(d, "Interactive", (PyObject*)Interactive_type) | 3017 if (PyDict_SetItemString(d, "Interactive", (PyObject*)Interactive_type) |
