mirror of https://github.com/swig/swig
Fix mangling overloaded functions in C API
A previous merge of master used a wrong function in get_mangled_type(): we need Swig_name_mangle_type() and not Swig_name_mangle_string() here, as it's more readable and, more importantly, backwards-compatible and doesn't change the identifiers used in the generated C API.
This commit is contained in:
parent
6848b3ef5c
commit
a183c7c980
|
@ -2139,7 +2139,9 @@ public:
|
|||
s += len_enum_prefix;
|
||||
Printf(result, "e%s", s);
|
||||
} else {
|
||||
Printf(result, "%s", Char(Swig_name_mangle_string(SwigType_base(type))));
|
||||
// Use Swig_name_mangle_type() here and not Swig_name_mangle_string() to get slightly simpler mangled name for templates (notably avoiding "_Sp_" and
|
||||
// "_SP_" fragments for the parentheses used by SWIG internally around template parameters).
|
||||
Printf(result, "%s", Char(Swig_name_mangle_type(SwigType_base(type))));
|
||||
}
|
||||
|
||||
Delete(prefix);
|
||||
|
|
Loading…
Reference in New Issue