Mercurial > hg
comparison mercurial/parsers.c @ 30090:8abe9264c73a
parsers: return NULL from PyInit_parsers on Python 3
This function must return a PyObject* or the compiler complains.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 08 Oct 2016 17:51:29 +0200 |
parents | 284d742e5611 |
children | c5afe5531709 |
comparison
equal
deleted
inserted
replaced
30089:040f23ed6963 | 30090:8abe9264c73a |
---|---|
2878 PyMODINIT_FUNC PyInit_parsers(void) | 2878 PyMODINIT_FUNC PyInit_parsers(void) |
2879 { | 2879 { |
2880 PyObject *mod; | 2880 PyObject *mod; |
2881 | 2881 |
2882 if (check_python_version() == -1) | 2882 if (check_python_version() == -1) |
2883 return; | 2883 return NULL; |
2884 mod = PyModule_Create(&parsers_module); | 2884 mod = PyModule_Create(&parsers_module); |
2885 module_init(mod); | 2885 module_init(mod); |
2886 return mod; | 2886 return mod; |
2887 } | 2887 } |
2888 #else | 2888 #else |