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:
parent
f06bba320a
commit
e15d3e17ac
2 changed files with 12 additions and 1 deletions
|
|
@ -706,7 +706,7 @@ Other ones are due to things that could be supported but haven't been implemente
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<H3>36.6.1 Additional sections</H3>
|
<H3>36.6.1 Additional customization possibilities</H3>
|
||||||
|
|
||||||
Generated C++ code can be customized by inserting custom code in the following sections:
|
Generated C++ code can be customized by inserting custom code in the following sections:
|
||||||
|
|
||||||
|
|
@ -715,6 +715,11 @@ Generated C++ code can be customized by inserting custom code in the following s
|
||||||
<li><tt>cxxcode</tt> for additional code to appear after the declarations of all wrapper classes, inside the module-specific namespace.</li>
|
<li><tt>cxxcode</tt> for additional code to appear after the declarations of all wrapper classes, inside the module-specific namespace.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
The following features are taken into account when generating C++ wrappers:
|
||||||
|
<ul>
|
||||||
|
<li><tt>cxxignore</tt> May be set to skip generation of C++ wrappers for the given function or class, while still generating C wrappers for them.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<H3>36.6.2 Exception handling</H3>
|
<H3>36.6.2 Exception handling</H3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
|
||||||
|
|
@ -828,6 +828,9 @@ public:
|
||||||
except_check_start =
|
except_check_start =
|
||||||
except_check_end = "";
|
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
|
// 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.
|
// choice but to avoid generating them, as otherwise we'd just generate uncompilable code.
|
||||||
if (Getattr(n, "sym:overloaded")) {
|
if (Getattr(n, "sym:overloaded")) {
|
||||||
|
|
@ -980,6 +983,9 @@ public:
|
||||||
if (!cxx_wrappers_.is_initialized())
|
if (!cxx_wrappers_.is_initialized())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (Checkattr(n, "feature:cxxignore", "1"))
|
||||||
|
return;
|
||||||
|
|
||||||
String* const classname = Getattr(n, "sym:name");
|
String* const classname = Getattr(n, "sym:name");
|
||||||
|
|
||||||
scoped_dohptr base_classes(NewStringEmpty());
|
scoped_dohptr base_classes(NewStringEmpty());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue