Allow skipping creating C++ wrappers with cxxignore feature

This can be useful to avoid errors due to features not supported at C++
level in some tests.
This commit is contained in:
Vadim Zeitlin 2021-12-09 00:36:09 +01:00
commit e15d3e17ac
2 changed files with 12 additions and 1 deletions

View file

@ -828,6 +828,9 @@ public:
except_check_start =
except_check_end = "";
if (Checkattr(n, "feature:cxxignore", "1"))
return;
// Usually generating wrappers for overloaded methods is fine, but sometimes their types can clash after applying typemaps and in this case we have no
// choice but to avoid generating them, as otherwise we'd just generate uncompilable code.
if (Getattr(n, "sym:overloaded")) {
@ -980,6 +983,9 @@ public:
if (!cxx_wrappers_.is_initialized())
return;
if (Checkattr(n, "feature:cxxignore", "1"))
return;
String* const classname = Getattr(n, "sym:name");
scoped_dohptr base_classes(NewStringEmpty());