diff --git a/wrap/Method.cpp b/wrap/Method.cpp index 45f5e3114..306ea986d 100644 --- a/wrap/Method.cpp +++ b/wrap/Method.cpp @@ -89,7 +89,8 @@ void Method::emit_cython_pxd(FileWriter& file, const Class& cls) const { << "("; argumentList(i).emit_cython_pxd(file, cls.pxdClassName(), cls.templateArgs); file.oss << ")"; - if (is_const_) file.oss << " const"; + // if (is_const_) file.oss << " const"; + file.oss << " except +"; file.oss << "\n"; } } diff --git a/wrap/StaticMethod.cpp b/wrap/StaticMethod.cpp index 25230fec6..e2a5a31ff 100644 --- a/wrap/StaticMethod.cpp +++ b/wrap/StaticMethod.cpp @@ -65,7 +65,7 @@ void StaticMethod::emit_cython_pxd(FileWriter& file, const Class& cls) const { returnVals_[i].emit_cython_pxd(file, cls.pxdClassName(), cls.templateArgs); file.oss << name_ + ((i>0)?"_" + to_string(i):"") << " \"" << name_ << "\"" << "("; argumentList(i).emit_cython_pxd(file, cls.pxdClassName(), cls.templateArgs); - file.oss << ")\n"; + file.oss << ") except +\n"; } } diff --git a/wrap/TemplateMethod.cpp b/wrap/TemplateMethod.cpp index 6435df7f9..d683fed50 100644 --- a/wrap/TemplateMethod.cpp +++ b/wrap/TemplateMethod.cpp @@ -29,7 +29,7 @@ void TemplateMethod::emit_cython_pxd(FileWriter& file, const Class& cls) const { returnVals_[i].emit_cython_pxd(file, cls.pxdClassName(), templateArgs); file.oss << name_ << "[" << argName << "]" << "("; argumentList(i).emit_cython_pxd(file, cls.pxdClassName(), templateArgs); - file.oss << ")\n"; + file.oss << ") except +\n"; } }