From ed01695d69ed632febc56551e9e0200127508218 Mon Sep 17 00:00:00 2001 From: Dave Beazley Date: Thu, 13 Jan 2000 20:42:12 +0000 Subject: [PATCH] Fixed String-replace() methods git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@87 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/Preprocessor/cpp.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/SWIG/Source/Preprocessor/cpp.c b/SWIG/Source/Preprocessor/cpp.c index 5faf65398..c57454905 100644 --- a/SWIG/Source/Preprocessor/cpp.c +++ b/SWIG/Source/Preprocessor/cpp.c @@ -153,7 +153,7 @@ DOH *SWIG_cpp_define(DOH *str, int swigmacro) assert(str); /* First make sure that string is actually a string */ - if (String_check(str)) { + if (DohCheck(str)) { s = Copy(str); copy_location(str,s); str = s; @@ -223,19 +223,19 @@ DOH *SWIG_cpp_define(DOH *str, int swigmacro) } if (!swigmacro) { - String_replace(macrovalue,"\\\n"," ", DOH_REPLACE_ANY); + Replace(macrovalue,"\\\n"," ", DOH_REPLACE_ANY); } /* Get rid of whitespace surrounding # */ - String_replace(macrovalue,"#","\001",DOH_REPLACE_NOQUOTE); + Replace(macrovalue,"#","\001",DOH_REPLACE_NOQUOTE); while(strstr(Char(macrovalue),"\001 ")) { - String_replace(macrovalue,"\001 ","\001", DOH_REPLACE_NOQUOTE); + Replace(macrovalue,"\001 ","\001", DOH_REPLACE_NOQUOTE); } while(strstr(Char(macrovalue)," \001")) { - String_replace(macrovalue," \001","\001", DOH_REPLACE_NOQUOTE); + Replace(macrovalue," \001","\001", DOH_REPLACE_NOQUOTE); } /* Replace '##' with a special token */ - String_replace(macrovalue,"\001\001","\002", DOH_REPLACE_NOQUOTE); + Replace(macrovalue,"\001\001","\002", DOH_REPLACE_NOQUOTE); /* Go create the macro */ macro = NewHash(); @@ -455,13 +455,13 @@ expand_macro(DOH *name, DOH *args) Clear(tempa); Printf(temp,"\001%s", aname); Printf(tempa,"\"%s\"",arg); - String_replace(ns, temp, tempa, DOH_REPLACE_ANY); + Replace(ns, temp, tempa, DOH_REPLACE_ANY); } - String_replace(ns, aname, arg, DOH_REPLACE_ID); + Replace(ns, aname, arg, DOH_REPLACE_ID); } } - String_replace(ns,"\002","",DOH_REPLACE_ANY); /* Get rid of concatenation tokens */ - String_replace(ns,"\001","#",DOH_REPLACE_ANY); /* Put # back (non-standard C) */ + Replace(ns,"\002","",DOH_REPLACE_ANY); /* Get rid of concatenation tokens */ + Replace(ns,"\001","#",DOH_REPLACE_ANY); /* Put # back (non-standard C) */ /* Expand this macro even further */ e = swig_cpp_replace(ns);