Skip to content
Snippets Groups Projects
Commit e431f4623043 authored by Stefan Behnel's avatar Stefan Behnel
Browse files

fix C compiler warnings about missing PyModuleDef field initialisers in Py3.[01]

parent fb8d41a783f9
No related branches found
No related tags found
No related merge requests found
......@@ -2077,4 +2077,8 @@
code.putln("")
code.putln("#if PY_MAJOR_VERSION >= 3")
code.putln("static struct PyModuleDef %s = {" % Naming.pymoduledef_cname)
code.putln("#if PY_VERSION_HEX < 0x03020000")
# fix C compiler warnings due to missing initialisers
code.putln(" { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },")
code.putln("#else")
code.putln(" PyModuleDef_HEAD_INIT,")
......@@ -2080,4 +2084,5 @@
code.putln(" PyModuleDef_HEAD_INIT,")
code.putln("#endif")
code.putln(' __Pyx_NAMESTR("%s"),' % env.module_name)
code.putln(" %s, /* m_doc */" % doc)
code.putln(" -1, /* m_size */")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment