Reuse Swig_string_mangle() instead of using Replaceall()
Use the same function in getNamespacedName() which was already used in getGlobalWrapperName() just below, this is more readable and more clear than just replacing dots with underscores as we did before. Also use scoped_dohptr instead of manual Delete() calls. No real changes.
This commit is contained in:
parent
1fb0de9e00
commit
d7f06c3721
1 changed files with 2 additions and 4 deletions
|
|
@ -189,10 +189,8 @@ public:
|
|||
String *nspace = Getattr(n, "sym:nspace");
|
||||
|
||||
if (nspace) {
|
||||
String *nspace_mangled = Copy(nspace);
|
||||
Replaceall(nspace_mangled, ".", "_");
|
||||
proxyname = NewStringf("%s_%s", nspace_mangled, symname);
|
||||
Delete(nspace_mangled);
|
||||
scoped_dohptr nspace_mangled(Swig_string_mangle(nspace));
|
||||
proxyname = NewStringf("%s_%s", (DOH*)nspace_mangled, symname);
|
||||
} else {
|
||||
proxyname = Copy(symname);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue