From f958140af5ba2b751c88a17596cbd96d91017307 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Tue, 23 Mar 2004 01:47:54 +0000 Subject: [PATCH] simpler mangling method git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5791 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Swig/misc.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/Source/Swig/misc.c b/Source/Swig/misc.c index 9d3cb1774..19ab057b4 100644 --- a/Source/Swig/misc.c +++ b/Source/Swig/misc.c @@ -238,17 +238,10 @@ String *Swig_string_mangle(String *s) { if (isalnum((int)c) || (c == '_')) { state = 1; if (space && (space == state)) { - Printf(result,"__b"); + Printf(result,"_SS_"); } 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 { if (isspace((int)c)) { @@ -339,9 +332,9 @@ String *Swig_string_mangle(String *s) { break; } if (isalpha((int)c)) { - Printf(result,"_S_%c",(int)c); + Printf(result,"_S%c_",(int)c); } else{ - Printf(result,"_S_%02X",(int)c); + Printf(result,"_S%02X_",(int)c); } } ++pc;