Mercurial > hg
changeset 20797:e286ab22e461
parsers: fix compiler errors on MSVC 2008
This broke in 3681de20b0a7.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 20 Mar 2014 00:01:59 -0400 |
parents | 131f7fe06e9e |
children | 170d6d591a7d |
files | mercurial/parsers.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/parsers.c Wed Mar 19 18:04:03 2014 -0500 +++ b/mercurial/parsers.c Thu Mar 20 00:01:59 2014 -0400 @@ -1969,18 +1969,22 @@ PyMODINIT_FUNC PyInit_parsers(void) { + PyObject *mod; + if (check_python_version() == -1) return; - PyObject *mod = PyModule_Create(&parsers_module); + mod = PyModule_Create(&parsers_module); module_init(mod); return mod; } #else PyMODINIT_FUNC initparsers(void) { + PyObject *mod; + if (check_python_version() == -1) return; - PyObject *mod = Py_InitModule3("parsers", methods, parsers_doc); + mod = Py_InitModule3("parsers", methods, parsers_doc); module_init(mod); } #endif