simpler mangling method
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5791 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
800ebd6a78
commit
f958140af5
1 changed files with 4 additions and 11 deletions
|
|
@ -238,17 +238,10 @@ String *Swig_string_mangle(String *s) {
|
||||||
if (isalnum((int)c) || (c == '_')) {
|
if (isalnum((int)c) || (c == '_')) {
|
||||||
state = 1;
|
state = 1;
|
||||||
if (space && (space == state)) {
|
if (space && (space == state)) {
|
||||||
Printf(result,"__b");
|
Printf(result,"_SS_");
|
||||||
}
|
}
|
||||||
space = 0;
|
space = 0;
|
||||||
if (c == '_' && *(pc + 1) == 'S' && *(pc + 2) == '_') {
|
|
||||||
/* '_S_' is use replaced because it is the special mangling symbol */
|
|
||||||
Printf(result,"_S_%02X",0);
|
|
||||||
pc += 3;
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
Printf(result,"%c",c);
|
Printf(result,"%c",c);
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (isspace((int)c)) {
|
if (isspace((int)c)) {
|
||||||
|
|
@ -339,9 +332,9 @@ String *Swig_string_mangle(String *s) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (isalpha((int)c)) {
|
if (isalpha((int)c)) {
|
||||||
Printf(result,"_S_%c",(int)c);
|
Printf(result,"_S%c_",(int)c);
|
||||||
} else{
|
} else{
|
||||||
Printf(result,"_S_%02X",(int)c);
|
Printf(result,"_S%02X_",(int)c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
++pc;
|
++pc;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue