Commit 58989a43 authored by Stefan Behnel's avatar Stefan Behnel

Fix C-code indentation of PyModuleDef struct by avoiding duplicate opening...

Fix C-code indentation of PyModuleDef struct by avoiding duplicate opening braces in conditional code.
parent 3e56b6fc
...@@ -3114,10 +3114,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -3114,10 +3114,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.putln("") code.putln("")
code.putln('#ifdef __cplusplus') code.putln('#ifdef __cplusplus')
code.putln('namespace {') code.putln('namespace {')
code.putln("struct PyModuleDef %s = {" % Naming.pymoduledef_cname) code.putln("struct PyModuleDef %s =" % Naming.pymoduledef_cname)
code.putln('#else') code.putln('#else')
code.putln("static struct PyModuleDef %s = {" % Naming.pymoduledef_cname) code.putln("static struct PyModuleDef %s =" % Naming.pymoduledef_cname)
code.putln('#endif') code.putln('#endif')
code.putln('{')
code.putln(" PyModuleDef_HEAD_INIT,") code.putln(" PyModuleDef_HEAD_INIT,")
code.putln(' %s,' % env.module_name.as_c_string_literal()) code.putln(' %s,' % env.module_name.as_c_string_literal())
code.putln(" %s, /* m_doc */" % doc) code.putln(" %s, /* m_doc */" % doc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment