Skip to content

Commit

Permalink
Py3: fix warning: missing field 'tp_print' initializer [-Wmissing-fie…
Browse files Browse the repository at this point in the history
…ld-initializers]

This warning is only specific to Py3.8. See https://docs.python.org/3/c-api/typeobj.html
  • Loading branch information
wwmayer committed Oct 15, 2020
1 parent 71236cb commit bc6fefe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Tools/generateTemplates/templateClassPyExport.py
Expand Up @@ -366,8 +366,12 @@ class @self.export.Namespace.replace("::","_")@Export @self.export.Name@ : publi
#if PY_MAJOR_VERSION >= 3
,0 /*tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x03080000
#if PY_VERSION_HEX >= 0x03090000
,0 /*tp_vectorcall */
#elif PY_VERSION_HEX >= 0x03080000
,0 /*tp_vectorcall */
/* bpo-37250: kept for backwards compatibility in CPython 3.8 only */
,0 /*tp_print */
#endif
};
Expand Down

0 comments on commit bc6fefe

Please sign in to comment.