avoid % and %= operators problem
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8162 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
af7b90f2df
commit
ab6313217b
1 changed files with 8 additions and 3 deletions
|
|
@ -500,10 +500,15 @@ String *apply_rename(String *newname, int fullname, String *prefix, String *name
|
||||||
if (destructor && (*(Char(newname)) != '~')) {
|
if (destructor && (*(Char(newname)) != '~')) {
|
||||||
fmt = tmp = NewStringf("~%s", newname);
|
fmt = tmp = NewStringf("~%s", newname);
|
||||||
}
|
}
|
||||||
if (fullname && prefix) {
|
/* use name as a fmt, but avoid C++ "%" and "%=" operators */
|
||||||
result = NewStringf(fmt,prefix,name);
|
if (Len(newname) > 1 && strstr(Char(newname),"%") && !Equal(newname,"%=")) {
|
||||||
|
if (fullname && prefix) {
|
||||||
|
result = NewStringf(fmt,prefix,name);
|
||||||
|
} else {
|
||||||
|
result = NewStringf(fmt,name);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
result = NewStringf(fmt,name);
|
result = Copy(newname);
|
||||||
}
|
}
|
||||||
if (tmp) Delete(tmp);
|
if (tmp) Delete(tmp);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue