Make swig_check() inline as it should have always been

Fix link errors when including the generated header from more than one
translation unit.
This commit is contained in:
Vadim Zeitlin 2021-11-27 01:03:12 +01:00
commit aa0df5faa0

View file

@ -268,7 +268,7 @@ struct cxx_wrappers
// Generate the functions which will be used in all wrappers to check for the exceptions only in this case, i.e. do not do it if they're already defined
// in another module imported by this one.
Printv(f_impls,
"void swig_check() {\n",
"inline void swig_check() {\n",
cindent, "if (SWIG_CException* swig_ex = SWIG_CException::get_pending()) {\n",
cindent, cindent, "SWIG_CException swig_ex_copy{*swig_ex};\n",
cindent, cindent, "SWIG_CException::reset_pending();\n",