Avoid errors due to generating identical overloads
Add typecheck typemaps for primitive types and string and call Swig_overload_check() to ensure that we don't generate two wrappers functions taking the same "const char*" type if we have overloads taking it and "std::string" (or a reference) in the original code.
This commit is contained in:
parent
4a3ae6f8d3
commit
a335fff2ec
3 changed files with 96 additions and 0 deletions
|
|
@ -402,6 +402,14 @@ public:
|
|||
if (Checkattr(n, "storage", "friend"))
|
||||
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")) {
|
||||
Swig_overload_check(n);
|
||||
if (Getattr(n, "overload:ignore"))
|
||||
return;
|
||||
}
|
||||
|
||||
temp_ptr_setter<Node*> set(&node_func_, n);
|
||||
|
||||
// As mentioned elsewhere, we can't use Swig_storage_isstatic() here because the "storage" attribute is temporarily saved in another view when this
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue