瀏覽代碼

Merge pull request #8473 from ghalliday/issue12350

HPCC-12350 Default string parameters to const char *

Reviewed-By: Shamser Ahmed <shamser.ahmed@lexisnexis.co.uk>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 9 年之前
父節點
當前提交
88966427c6

+ 2 - 0
ecl/hql/hqlatoms.cpp

@@ -279,6 +279,7 @@ IAtom * newSetAtom;
 IAtom * _nlpParse_Atom;
 IAtom * noBoundCheckAtom;
 IAtom * noCaseAtom;
+IAtom * noConstAtom;
 IAtom * nofoldAtom;
 IAtom * _noHoist_Atom;
 IAtom * noLocalAtom;
@@ -720,6 +721,7 @@ MODULE_INIT(INIT_PRIORITY_HQLATOM)
     MAKESYSATOM(nlpParse);
     MAKEATOM(noBoundCheck);
     MAKEATOM(noCase);
+    MAKEATOM(noConst);
     MAKEATOM(nofold);
     MAKESYSATOM(noHoist);
     MAKEATOM(noLocal);

+ 1 - 0
ecl/hql/hqlatoms.hpp

@@ -283,6 +283,7 @@ extern HQL_API IAtom * newSetAtom;
 extern HQL_API IAtom * _nlpParse_Atom;
 extern HQL_API IAtom * noBoundCheckAtom;
 extern HQL_API IAtom * noCaseAtom;
+extern HQL_API IAtom * noConstAtom;
 extern HQL_API IAtom * nofoldAtom;
 extern HQL_API IAtom * _noHoist_Atom;
 extern HQL_API IAtom * noLocalAtom;

+ 2 - 0
ecl/hql/hqlgram.y

@@ -314,6 +314,7 @@ static void eclsyntaxerror(HqlGram * parser, const char * s, short yystate, int
   NOBOUNDCHECK
   NOCASE
   NOCOMBINE
+  NOCONST
   NOFOLD
   NOHOIST
   NOLOCAL
@@ -3873,6 +3874,7 @@ formalQualifiers
 
 formalQualifier
     : TOK_CONST         {   $$.setExpr(createAttribute(constAtom), $1); }
+    | NOCONST           {   $$.setExpr(createAttribute(noConstAtom), $1); }
     | TOK_ASSERT TOK_CONST  
                         {   $$.setExpr(createAttribute(assertConstAtom), $1); }
     | FIELD_REF         {

+ 1 - 0
ecl/hql/hqlgram2.cpp

@@ -10682,6 +10682,7 @@ static void getTokenText(StringBuffer & msg, int token)
     case NOBOUNDCHECK: msg.append("NOBOUNDCHECK"); break;
     case NOCASE: msg.append("NOCASE"); break;
     case NOCOMBINE: msg.append("NOCOMBINE"); break;
+    case NOCONST: msg.append("NOCONST"); break;
     case NOFOLD: msg.append("NOFOLD"); break;
     case NOHOIST: msg.append("NOHOIST"); break;
     case NOLOCAL: msg.append("NOLOCAL"); break;

+ 1 - 0
ecl/hql/hqllex.l

@@ -811,6 +811,7 @@ NAMESPACE           { RETURNSYM(NAMESPACE); }
 NOBOUNDCHECK        { RETURNSYM(NOBOUNDCHECK); }
 NOCASE              { RETURNSYM(NOCASE); }
 NOCOMBINE           { RETURNSYM(NOCOMBINE); }
+NOCONST             { RETURNSYM(NOCONST); }
 NOFOLD              { RETURNSYM(NOFOLD); }
 NOHOIST             { RETURNSYM(NOHOIST); }
 NOLOCAL             { RETURNSYM(NOLOCAL); }

+ 2 - 2
ecl/hql/hqlutil.cpp

@@ -7381,7 +7381,7 @@ public:
             ITypeInfo *paramType = param->queryType();
 
             bool isOut = param->hasAttribute(outAtom);
-            bool isConst = param->hasAttribute(constAtom);
+            bool isConst = !param->hasAttribute(noConstAtom);
 
             if (isOut)
                 mangled.append("R");
@@ -7629,7 +7629,7 @@ public:
             ITypeInfo *paramType = param->queryType();
 
             bool isOut = param->hasAttribute(outAtom);
-            bool isConst = param->hasAttribute(constAtom);
+            bool isConst = !param->hasAttribute(noConstAtom);
 
             if (isOut)
                 appendRef(mangled, false);

+ 2 - 0
ecl/hql/reservedwords.cpp

@@ -369,6 +369,7 @@ static const char * eclReserved12[] = {//Attributes
     "lookup",
     "lzw",
     "many",
+    "noconst",
     "noroot",
     "noscan",
     "notrim",
@@ -486,6 +487,7 @@ static const char * eclReserved15[] = { //Actions and statements
     "build",
     "buildindex",
     "checkpoint",
+    "critical",
     "cron",
     "define",
     "deprecated",

+ 96 - 97
ecl/hqlcpp/hqlcppsys.ecl

@@ -31,7 +31,6 @@ const char * cppSystemText[]  = {
     
     "export InternalCppService := SERVICE:fold",
     //  searchTableStringN(unsigned4 num, string table, string search) : library='eclrtl';
-    //  memcpy(void * target, void * src, unsigned len);
     //internal code generation helper functions...
     "   unsigned4 an2l4(const string src) : eclrtl,pure,library='eclrtl',entrypoint='rtlStrToUInt4';",
     "   unsigned8 an2l8(const string src) : eclrtl,pure,library='eclrtl',entrypoint='rtlStrToUInt8';",
@@ -57,15 +56,15 @@ const char * cppSystemText[]  = {
 
     "   string _intformat(integer8 value, unsigned4 width, unsigned4 flags) : eclrtl,pure,library='eclrtl',entrypoint='rtlIntFormat';",
     "   string _realformat(real8 value, unsigned4 width, unsigned4 places) : eclrtl,pure,library='eclrtl',entrypoint='rtlRealFormat';",
-    "   l42an(string target, unsigned integer4 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlUInt4ToStr';",
-    "   l82an(string target, unsigned integer8 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlUInt8ToStr';",
-    "   ls42an(string target, integer4 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlInt4ToStr';",
-    "   ls82an(string target, integer8 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlInt8ToStr';",
+    "   l42an(noconst string target, unsigned integer4 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlUInt4ToStr';",
+    "   l82an(noconst string target, unsigned integer8 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlUInt8ToStr';",
+    "   ls42an(noconst string target, integer4 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlInt4ToStr';",
+    "   ls82an(noconst string target, integer8 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlInt8ToStr';",
 
-    "   l42vn(string target, unsigned integer4 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlUInt4ToVStr';",
-    "   l82vn(string target, unsigned integer8 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlUInt8ToVStr';",
-    "   ls42vn(string target, integer4 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlInt4ToVStr';",
-    "   ls82vn(string target, integer8 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlInt8ToVStr';",
+    "   l42vn(noconst string target, unsigned integer4 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlUInt4ToVStr';",
+    "   l82vn(noconst string target, unsigned integer8 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlUInt8ToVStr';",
+    "   ls42vn(noconst string target, integer4 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlInt4ToVStr';",
+    "   ls82vn(noconst string target, integer8 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlInt8ToVStr';",
 
     "   varstring l42vx(unsigned integer4 src) :    eclrtl,pure,library='eclrtl',entrypoint='rtlUInt4ToVStrX';",
     "   varstring l82vx(unsigned integer8 src) :    eclrtl,pure,library='eclrtl',entrypoint='rtlUInt8ToVStrX';",
@@ -77,9 +76,9 @@ const char * cppSystemText[]  = {
     "   string ls42ax(integer4 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlInt4ToStrX';",
     "   string ls82ax(integer8 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlInt8ToStrX';",
 
-    "   f2an(string target, real8 val) :    eclrtl,pure,library='eclrtl',entrypoint='rtlRealToStr';",
+    "   f2an(noconst string target, real8 val) :    eclrtl,pure,library='eclrtl',entrypoint='rtlRealToStr';",
     "   string _f2ax(real8 val) :   eclrtl,pure,library='eclrtl',entrypoint='rtlRealToStrX';",
-    "   f2vn(string target, real8 val) :    eclrtl,pure,library='eclrtl',entrypoint='rtlRealToVStr';",
+    "   f2vn(noconst string target, real8 val) :    eclrtl,pure,library='eclrtl',entrypoint='rtlRealToVStr';",
     "   varstring f2vx(real8 val) : eclrtl,pure,library='eclrtl',entrypoint='rtlRealToVStrX';",
 
     "   string str2StrX(const data src) :   eclrtl,pure,include,library='eclrtl',entrypoint='rtlStrToStrX';",
@@ -89,16 +88,16 @@ const char * cppSystemText[]  = {
     "   string ebcdic2asciiX(const ebcdic string src) : eclrtl,pure,include,library='eclrtl',entrypoint='rtlEStrToStrX';",
     "   ebcdic string ascii2ebcdicX(const string src) : eclrtl,pure,include,library='eclrtl',entrypoint='rtlStrToEStrX';",
 
-    "   strToQStr(qstring tgt, const data src) :    eclrtl,pure,include,library='eclrtl',entrypoint='rtlStrToQStr';",
+    "   strToQStr(noconst qstring tgt, const data src) :    eclrtl,pure,include,library='eclrtl',entrypoint='rtlStrToQStr';",
     "   qstring strToQStrX(const data src) :    eclrtl,pure,include,library='eclrtl',entrypoint='rtlStrToQStrX';",
     "   string qstr2StrX(const qstring src) :   eclrtl,pure,include,library='eclrtl',entrypoint='rtlQStrToStrX';",
     "   data qstr2DataX(const qstring src) :    eclrtl,pure,include,library='eclrtl',entrypoint='rtlQStrToDataX';",
     "   boolean qstr2Bool(const qstring src) :  eclrtl,pure,include,library='eclrtl',entrypoint='rtlQStrToBool';",
-    "   qstr2Data(data tgt, const qstring src) :    eclrtl,pure,include,library='eclrtl',entrypoint='rtlQStrToData';",
-    "   qstr2Str(string tgt, const qstring src) :   eclrtl,pure,include,library='eclrtl',entrypoint='rtlQStrToStr';",
-    "   qstrToQStr(qstring tgt, const qstring src) :    eclrtl,pure,include,library='eclrtl',entrypoint='rtlQStrToQStr';",
+    "   qstr2Data(noconst data tgt, const qstring src) :    eclrtl,pure,include,library='eclrtl',entrypoint='rtlQStrToData';",
+    "   qstr2Str(noconst string tgt, const qstring src) :   eclrtl,pure,include,library='eclrtl',entrypoint='rtlQStrToStr';",
+    "   qstrToQStr(noconst qstring tgt, const qstring src) :    eclrtl,pure,include,library='eclrtl',entrypoint='rtlQStrToQStr';",
     "   qstring qstrToQStrX(const qstring src) :    eclrtl,pure,include,library='eclrtl',entrypoint='rtlQStrToQStrX';",
-    "   qstr2VStr(string tgt, const qstring src) :  eclrtl,pure,include,library='eclrtl',entrypoint='rtlQStrToVStr';",
+    "   qstr2VStr(noconst string tgt, const qstring src) :  eclrtl,pure,include,library='eclrtl',entrypoint='rtlQStrToVStr';",
     "   unsigned4 qstrLength(unsigned4 sz) :    eclrtl,pure,include,library='eclrtl',entrypoint='rtlQStrLength';",
     "   unsigned4 qstrSize(unsigned4 len) : eclrtl,pure,include,library='eclrtl',entrypoint='rtlQStrSize';",
 
@@ -111,35 +110,35 @@ const char * cppSystemText[]  = {
     "   unicode concatUnicode(unicode tgt) :    eclrtl,pure,include,library='eclrtl',entrypoint='rtlConcatUnicode';",
     "   varunicode concatVUnicode(varunicode tgt) : eclrtl,pure,include,library='eclrtl',entrypoint='rtlConcatVUnicode';",
     "   utf8 concatUtf8(utf8 tgt) : eclrtl,pure,include,library='eclrtl',entrypoint='rtlConcatUtf8';",
-    "   varstring createQuotedString(string tgt) :  eclrtl,pure,library='eclrtl',entrypoint='rtlCreateQuotedString';",
+    "   varstring createQuotedString(string src) :  eclrtl,pure,library='eclrtl',entrypoint='rtlCreateQuotedString';",
     "   concatExtend(boolean prev, const string src) :  eclrtl,pure,library='eclrtl',include,entrypoint='rtlConcatExtend';",
-    "   concatStrF(data tgt) : eclrtl,pure,include,library='eclrtl',entrypoint='rtlConcatStrF';",
-    "   concatVStrF(string tgt) : eclrtl,pure,include,library='eclrtl',entrypoint='rtlConcatVStrF';",
-    "   concatUnicodeF(unicode tgt) : eclrtl,pure,include,library='eclrtl',entrypoint='rtlConcatUnicodeF';",
-    "   concatVUNicodeF(unicode tgt) : eclrtl,pure,include,library='eclrtl',entrypoint='rtlConcatVUnicodeF';",
+    "   concatStrF(noconst data tgt) : eclrtl,pure,include,library='eclrtl',entrypoint='rtlConcatStrF';",
+    "   concatVStrF(noconst string tgt) : eclrtl,pure,include,library='eclrtl',entrypoint='rtlConcatVStrF';",
+    "   concatUnicodeF(noconst unicode tgt) : eclrtl,pure,include,library='eclrtl',entrypoint='rtlConcatUnicodeF';",
+    "   concatVUNicodeF(noconst unicode tgt) : eclrtl,pure,include,library='eclrtl',entrypoint='rtlConcatVUnicodeF';",
 
     "   string concatStrExtend(const string src) :  eclrtl,extend,pure,library='eclrtl',include,entrypoint='rtlConcatExtend';",
     "   unicode concatUnicodeExtend(const unicode src) :  eclrtl,extend,pure,library='eclrtl',include,entrypoint='rtlConcatUnicodeExtend';",
 
-    "   unsigned4 concatStr2Str(string tgt, unsigned4 idx, const string src) :  eclrtl,library='eclrtl',entrypoint='rtlConcatStrToStr';",
-    "   unsigned4 concatVStr2Str(string tgt, unsigned4 idx, const varstring src) : eclrtl,library='eclrtl',entrypoint='rtlConcatVStrToStr';",
-    "   unsigned4 concatUtf8ToUtf8(utf8 tgt, unsigned4 idx, const utf8 src) : eclrtl,library='eclrtl',entrypoint='rtlConcatUtf8ToUtf8';",
-    "   unsigned4 concatUnicodeToUnicode(unicode tgt, unsigned4 idx, const unicode src) : eclrtl,library='eclrtl',entrypoint='rtlConcatUnicodeToUnicode';",
-    "   unsigned4 concatVUnicodeToUnicode(unicode tgt, unsigned4 idx, const varunicode src) : eclrtl,library='eclrtl',entrypoint='rtlConcatVUnicodeToUnicode';",
-    "   codepage2Unicode(unicode tgt, const string src, const varstring codepage) : eclrtl,pure,library='eclrtl',entrypoint='rtlCodepageToUnicode';",
-    "   codepage2VUnicode(unicode tgt, const string src, const varstring codepage) :    eclrtl,pure,library='eclrtl',entrypoint='rtlCodepageToVUnicode';",
-    "   vcodepage2Unicode(unicode tgt, const varstring src, const varstring codepage) : eclrtl,pure,library='eclrtl',entrypoint='rtlVCodepageToUnicode';",
-    "   vcodepage2VUnicode(unicode tgt, const varstring src, const varstring codepage) :    eclrtl,pure,library='eclrtl',entrypoint='rtlVCodepageToVUnicode';",
-    "   unicode2Codepage(string tgt, const unicode src, const varstring codepage) : eclrtl,pure,library='eclrtl',entrypoint='rtlUnicodeToCodepage';",
-    "   unicode2Data(data tgt, const unicode src) : eclrtl,pure,library='eclrtl',entrypoint='rtlUnicodeToData';",
-    "   unicode2VCodepage(string tgt, const unicode src, const varstring codepage) :    eclrtl,pure,library='eclrtl',entrypoint='rtlUnicodeToVCodepage';",
-    "   vunicode2Codepage(string tgt, const varunicode src, const varstring codepage) : eclrtl,pure,library='eclrtl',entrypoint='rtlVUnicodeToCodepage';",
-    "   vunicode2Data(data tgt, const varunicode src) : eclrtl,pure,library='eclrtl',entrypoint='rtlVUnicodeToData';",
-    "   vunicode2VCodepage(string tgt, const varunicode src, const varstring codepage) :    eclrtl,pure,library='eclrtl',entrypoint='rtlVUnicodeToVCodepage';",
-    "   unicode2Unicode(unicode tgt, const unicode src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlUnicodeToUnicode';",
-    "   unicode2VUnicode(unicode tgt, const unicode src) :  eclrtl,pure,library='eclrtl',entrypoint='rtlUnicodeToVUnicode';",
-    "   vunicode2Unicode(unicode tgt, const varunicode src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlVUnicodeToUnicode';",
-    "   vunicode2VUnicode(unicode tgt, const varunicode src) :  eclrtl,pure,library='eclrtl',entrypoint='rtlVUnicodeToVUnicode';",
+    "   unsigned4 concatStr2Str(noconst string tgt, unsigned4 idx, const string src) :  eclrtl,library='eclrtl',entrypoint='rtlConcatStrToStr';",
+    "   unsigned4 concatVStr2Str(noconst string tgt, unsigned4 idx, const varstring src) : eclrtl,library='eclrtl',entrypoint='rtlConcatVStrToStr';",
+    "   unsigned4 concatUtf8ToUtf8(noconst utf8 tgt, unsigned4 idx, const utf8 src) : eclrtl,library='eclrtl',entrypoint='rtlConcatUtf8ToUtf8';",
+    "   unsigned4 concatUnicodeToUnicode(noconst unicode tgt, unsigned4 idx, const unicode src) : eclrtl,library='eclrtl',entrypoint='rtlConcatUnicodeToUnicode';",
+    "   unsigned4 concatVUnicodeToUnicode(noconst unicode tgt, unsigned4 idx, const varunicode src) : eclrtl,library='eclrtl',entrypoint='rtlConcatVUnicodeToUnicode';",
+    "   codepage2Unicode(noconst unicode tgt, const string src, const varstring codepage) : eclrtl,pure,library='eclrtl',entrypoint='rtlCodepageToUnicode';",
+    "   codepage2VUnicode(noconst unicode tgt, const string src, const varstring codepage) :    eclrtl,pure,library='eclrtl',entrypoint='rtlCodepageToVUnicode';",
+    "   vcodepage2Unicode(noconst unicode tgt, const varstring src, const varstring codepage) : eclrtl,pure,library='eclrtl',entrypoint='rtlVCodepageToUnicode';",
+    "   vcodepage2VUnicode(noconst unicode tgt, const varstring src, const varstring codepage) :    eclrtl,pure,library='eclrtl',entrypoint='rtlVCodepageToVUnicode';",
+    "   unicode2Codepage(noconst string tgt, const unicode src, const varstring codepage) : eclrtl,pure,library='eclrtl',entrypoint='rtlUnicodeToCodepage';",
+    "   unicode2Data(noconst data tgt, const unicode src) : eclrtl,pure,library='eclrtl',entrypoint='rtlUnicodeToData';",
+    "   unicode2VCodepage(noconst string tgt, const unicode src, const varstring codepage) :    eclrtl,pure,library='eclrtl',entrypoint='rtlUnicodeToVCodepage';",
+    "   vunicode2Codepage(noconst string tgt, const varunicode src, const varstring codepage) : eclrtl,pure,library='eclrtl',entrypoint='rtlVUnicodeToCodepage';",
+    "   vunicode2Data(noconst data tgt, const varunicode src) : eclrtl,pure,library='eclrtl',entrypoint='rtlVUnicodeToData';",
+    "   vunicode2VCodepage(noconst string tgt, const varunicode src, const varstring codepage) :    eclrtl,pure,library='eclrtl',entrypoint='rtlVUnicodeToVCodepage';",
+    "   unicode2Unicode(noconst unicode tgt, const unicode src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlUnicodeToUnicode';",
+    "   unicode2VUnicode(noconst unicode tgt, const unicode src) :  eclrtl,pure,library='eclrtl',entrypoint='rtlUnicodeToVUnicode';",
+    "   vunicode2Unicode(noconst unicode tgt, const varunicode src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlVUnicodeToUnicode';",
+    "   vunicode2VUnicode(noconst unicode tgt, const varunicode src) :  eclrtl,pure,library='eclrtl',entrypoint='rtlVUnicodeToVUnicode';",
     "   unicode codepage2UnicodeX(const string src, const varstring codepage) : eclrtl,pure,library='eclrtl',entrypoint='rtlCodepageToUnicodeX';",
     "   varunicode codepage2VUnicodeX(const string src, const varstring codepage) : eclrtl,pure,library='eclrtl',entrypoint='rtlCodepageToVUnicodeX';",
     "   unicode vcodepage2UnicodeX(const varstring src, const varstring codepage) : eclrtl,pure,library='eclrtl',entrypoint='rtlVCodepageToUnicodeX';",
@@ -153,14 +152,14 @@ const char * cppSystemText[]  = {
     "   varunicode unicode2VUnicodeX(const unicode src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlUnicodeToVUnicodeX';",
     "   unicode vunicode2UnicodeX(const varunicode src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlVUnicodeToUnicodeX';",
     "   varunicode vunicode2VUnicodeX(const varunicode src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlVUnicodeToVUnicodeX';",
-    "   unicodeStrcpy(varunicode tgt, const varunicode src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlUnicodeStrcpy';",
+    "   unicodeStrcpy(noconst varunicode tgt, const varunicode src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlUnicodeStrcpy';",
     "   unsigned4 unicodeStrlen(const varunicode src) : eclrtl,pure,library='eclrtl',entrypoint='rtlUnicodeStrlen';",
     "   data keyUnicodeX(const unicode src, const varstring loc) :  eclrtl,library='eclrtl',entrypoint='rtlKeyUnicodeX';",
     "   data keyUnicodeStrengthX(const unicode src, const varstring loc, unsigned4 str) :   eclrtl,library='eclrtl',entrypoint='rtlKeyUnicodeStrengthX';",
 
-    "   l2vn4(string target, unsigned integer4 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtl_l2vn4';",
-    "   l2vn8(string target, unsigned integer8 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtl_l2vn8';",
-    "   pack(string target, const string src) : eclrtl,library='eclrtl',entrypoint='rtlPack';",
+    "   l2vn4(noconst string target, unsigned integer4 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtl_l2vn4';",
+    "   l2vn8(noconst string target, unsigned integer8 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtl_l2vn8';",
+    "   pack(noconst string target, const string src) : eclrtl,library='eclrtl',entrypoint='rtlPack';",
     "   integer4 searchDataTable(unsigned4 num, unsigned4 elemlen, const string entries, const string search) : eclrtl,pure,library='eclrtl',include='eclrtl.hpp',entrypoint='rtlNewSearchDataTable';",
     "   integer4 searchEStringTable(unsigned4 num, unsigned4 elemlen, const string entries, const string search) : eclrtl,pure,library='eclrtl',include='eclrtl.hpp',entrypoint='rtlNewSearchEStringTable';",
     "   integer4 searchQStringTable(unsigned4 num, unsigned4 elemlen, const string entries, const string search) : eclrtl,pure,library='eclrtl',include='eclrtl.hpp',entrypoint='rtlNewSearchQStringTable';",
@@ -175,9 +174,9 @@ const char * cppSystemText[]  = {
     "   integer4 searchTableUInteger4(set of unsigned4 values, unsigned4 search) : eclrtl,pure,library='eclrtl',include,entrypoint='rtlSearchTableUInteger4',oldSetFormat;",
     "   integer4 searchTableUInteger8(set of unsigned8 values, unsigned8 search) : eclrtl,pure,library='eclrtl',include,entrypoint='rtlSearchTableUInteger8',oldSetFormat;",
 
-    "   unpack(string target, const string src) :   eclrtl,library='eclrtl',entrypoint='rtlUnpack';",
-    "   ebcdic2ascii(string target, const ebcdic string src) :  eclrtl,library='eclrtl',entrypoint='rtlEStrToStr';",
-    "   ascii2ebcdic(ebcdic string target, const string src) :  eclrtl,library='eclrtl',entrypoint='rtlStrToEStr';",
+    "   unpack(noconst string target, const string src) :   eclrtl,library='eclrtl',entrypoint='rtlUnpack';",
+    "   ebcdic2ascii(noconst string target, const ebcdic string src) :  eclrtl,library='eclrtl',entrypoint='rtlEStrToStr';",
+    "   ascii2ebcdic(noconst ebcdic string target, const string src) :  eclrtl,library='eclrtl',entrypoint='rtlStrToEStr';",
 
     "   unsigned4 trimStrLen(const string src): eclrtl,pure,library='eclrtl',entrypoint='rtlTrimStrLen';",
     "   unsigned4 trimUnicodeStrLen(const unicode src): eclrtl,pure,library='eclrtl',entrypoint='rtlTrimUnicodeStrLen';",
@@ -206,13 +205,13 @@ const char * cppSystemText[]  = {
     "   unicode trimVUnicodeAll(const varunicode src) : eclrtl,pure,library='eclrtl',entrypoint='rtlTrimVUnicodeAll';",
     "   data subDataFTX(const data src, unsigned4 from, unsigned4 to) : eclrtl,pure,library='eclrtl',entrypoint='rtlSubDataFTX';",
     "   data subDataFX(const data src, unsigned4 from) : eclrtl,pure,library='eclrtl',entrypoint='rtlSubDataFX';",
-    "   subDataFT(data tgt, const data src, unsigned4 from, unsigned4 to) : eclrtl,pure,library='eclrtl',entrypoint='rtlSubDataFT';",
+    "   subDataFT(noconst data tgt, const data src, unsigned4 from, unsigned4 to) : eclrtl,pure,library='eclrtl',entrypoint='rtlSubDataFT';",
     "   string subStrFTX(const string src, unsigned4 from, unsigned4 to) : eclrtl,pure,library='eclrtl',entrypoint='rtlSubStrFTX';",
     "   string subStrFX(const string src, unsigned4 from) : eclrtl,pure,library='eclrtl',entrypoint='rtlSubStrFX';",
-    "   subStrFT(string tgt, const string src, unsigned4 from, unsigned4 to) : eclrtl,pure,library='eclrtl',entrypoint='rtlSubStrFT';",
+    "   subStrFT(noconst string tgt, const string src, unsigned4 from, unsigned4 to) : eclrtl,pure,library='eclrtl',entrypoint='rtlSubStrFT';",
     "   qstring subQStrFTX(const qstring src, unsigned4 from, unsigned4 to) : eclrtl,pure,library='eclrtl',entrypoint='rtlSubQStrFTX';",
     "   qstring subQStrFX(const qstring src, unsigned4 from) : eclrtl,pure,library='eclrtl',entrypoint='rtlSubQStrFX';",
-    "   subQStrFT(qstring tgt, const qstring src, unsigned4 from, unsigned4 to) : eclrtl,pure,library='eclrtl',entrypoint='rtlSubQStrFT';",
+    "   subQStrFT(noconst qstring tgt, const qstring src, unsigned4 from, unsigned4 to) : eclrtl,pure,library='eclrtl',entrypoint='rtlSubQStrFT';",
     "   unicode unicodeSubStrFTX(const unicode src, unsigned4 from, unsigned4 to) : eclrtl,pure,library='eclrtl',entrypoint='rtlUnicodeSubStrFTX';",
     "   unicode unicodeSubStrFX(const unicode src, unsigned4 from) : eclrtl,pure,library='eclrtl',entrypoint='rtlUnicodeSubStrFX';",
     "   unsigned4 rtlMax(unsigned4 idx, unsigned4 len) : eclrtl,pure,entrypoint='rtlMax',include;",
@@ -232,22 +231,22 @@ const char * cppSystemText[]  = {
     "   integer4 prefixDiffStr(const string l, const string r, unsigned4 origin) : eclrtl,pure,library='eclrtl',entrypoint='rtlPrefixDiffStrEx';",
     "   integer4 prefixDiffUnicode(const unicode l, const unicode r, const varstring loc, unsigned4 origin) : eclrtl,pure,library='eclrtl',entrypoint='rtlPrefixDiffUnicodeEx';",
 
-    "   createOrder(data1 tgt, const data1 src, unsigned4 num, unsigned4 width, const data1 compare) : eclrtl,library='eclrtl',entrypoint='rtlCreateOrder';",
+    "   createOrder(noconst data1 tgt, const data1 src, unsigned4 num, unsigned4 width, const data1 compare) : eclrtl,library='eclrtl',entrypoint='rtlCreateOrder';",
     "   unsigned4 rankFromOrder(unsigned4 idx, unsigned4 num, const data1 order) : eclrtl,pure,library='eclrtl',entrypoint='rtlRankFromOrder';",
     "   unsigned4 rankedFromOrder(unsigned4 idx, unsigned4 num, const data1 order) : eclrtl,pure,library='eclrtl',entrypoint='rtlRankedFromOrder';",
         
     "   boolean data2Bool(const data src) : eclrtl,pure,library='eclrtl',entrypoint='rtlDataToBool';",
-    "   bool2Data(data tgt, boolean src) :  eclrtl,library='eclrtl',entrypoint='rtlBoolToData';",
-    "   bool2Str(data tgt, boolean src) :   eclrtl,library='eclrtl',entrypoint='rtlBoolToStr';",
+    "   bool2Data(noconst data tgt, boolean src) :  eclrtl,library='eclrtl',entrypoint='rtlBoolToData';",
+    "   bool2Str(noconst data tgt, boolean src) :   eclrtl,library='eclrtl',entrypoint='rtlBoolToStr';",
     "   bool2VStr(varstring tgt, boolean src) : eclrtl,library='eclrtl',entrypoint='rtlBoolToVStr';",
-    "   str2Data(data tgt, const data src) :    eclrtl,library='eclrtl',entrypoint='rtlStrToData';",
-    "   str2Str(data tgt, const data src) : eclrtl,library='eclrtl',entrypoint='rtlStrToStr';",
-    "   eStr2EStr(data tgt, const data src) :   eclrtl,library='eclrtl',entrypoint='rtlEStrToEStr';",
-    "   eStr2VStr(data tgt, const ebcdic string src) :  eclrtl,library='eclrtl',entrypoint='rtlEStrToVStr';",
-    "   str2VStr(data tgt, const data src) :    eclrtl,library='eclrtl',entrypoint='rtlStrToVStr';",
-    "   vStr2Data(data tgt, const varstring src) :  eclrtl,library='eclrtl',entrypoint='rtlVStrToData';",
-    "   vStr2Str(data tgt, const varstring src) :   eclrtl,library='eclrtl',entrypoint='rtlVStrToStr';",
-    "   vStr2VStr(data tgt, const varstring src) :  eclrtl,library='eclrtl',entrypoint='rtlVStrToVStr';",
+    "   str2Data(noconst data tgt, const data src) :    eclrtl,library='eclrtl',entrypoint='rtlStrToData';",
+    "   str2Str(noconst data tgt, const data src) : eclrtl,library='eclrtl',entrypoint='rtlStrToStr';",
+    "   eStr2EStr(noconst data tgt, const data src) :   eclrtl,library='eclrtl',entrypoint='rtlEStrToEStr';",
+    "   eStr2VStr(noconst data tgt, const ebcdic string src) :  eclrtl,library='eclrtl',entrypoint='rtlEStrToVStr';",
+    "   str2VStr(noconst data tgt, const data src) :    eclrtl,library='eclrtl',entrypoint='rtlStrToVStr';",
+    "   vStr2Data(noconst data tgt, const varstring src) :  eclrtl,library='eclrtl',entrypoint='rtlVStrToData';",
+    "   vStr2Str(noconst data tgt, const varstring src) :   eclrtl,library='eclrtl',entrypoint='rtlVStrToStr';",
+    "   vStr2VStr(noconst data tgt, const varstring src) :  eclrtl,library='eclrtl',entrypoint='rtlVStrToVStr';",
 
     "   boolean csvStr2Bool(const string src) : eclrtl,pure,library='eclrtl',entrypoint='rtlCsvStrToBool';",
     "   string bool2StrX(boolean src) : eclrtl,library='eclrtl',entrypoint='rtlBoolToStrX';",
@@ -261,15 +260,15 @@ const char * cppSystemText[]  = {
     "   unsigned8 readUInt5(const data1 src) :  eclrtl,pure,library='eclrtl',entrypoint='rtlReadUInt5';",
     "   unsigned8 readUInt6(const data1 src) :  eclrtl,pure,library='eclrtl',entrypoint='rtlReadUInt6';",
     "   unsigned8 readUInt7(const data1 src) :  eclrtl,pure,library='eclrtl',entrypoint='rtlReadUInt7';",
-    "   writeInt3(data1 src, unsigned4 value) : eclrtl,library='eclrtl',entrypoint='rtlWriteInt3';",
-    "   writeInt5(data1 src, unsigned8 value) : eclrtl,library='eclrtl',entrypoint='rtlWriteInt5';",
-    "   writeInt6(data1 src, unsigned8 value) : eclrtl,library='eclrtl',entrypoint='rtlWriteInt6';",
-    "   writeInt7(data1 src, unsigned8 value) : eclrtl,library='eclrtl',entrypoint='rtlWriteInt7';",
+    "   writeInt3(noconst data1 src, unsigned4 value) : eclrtl,library='eclrtl',entrypoint='rtlWriteInt3';",
+    "   writeInt5(noconst data1 src, unsigned8 value) : eclrtl,library='eclrtl',entrypoint='rtlWriteInt5';",
+    "   writeInt6(noconst data1 src, unsigned8 value) : eclrtl,library='eclrtl',entrypoint='rtlWriteInt6';",
+    "   writeInt7(noconst data1 src, unsigned8 value) : eclrtl,library='eclrtl',entrypoint='rtlWriteInt7';",
 
     "   integer8 getPackedSigned(const data1 src) : eclrtl,library='eclrtl',entrypoint='rtlGetPackedSigned';",
     "   unsigned8 getPackedUnsigned(const data1 src) :  eclrtl,library='eclrtl',entrypoint='rtlGetPackedUnsigned';",
-    "   setPackedSigned(data1 src, integer8 value) :    eclrtl,library='eclrtl',entrypoint='rtlSetPackedSigned';",
-    "   setPackedUnsigned(data1 src, unsigned8 value) : eclrtl,library='eclrtl',entrypoint='rtlSetPackedUnsigned';",
+    "   setPackedSigned(noconst data1 src, integer8 value) :    eclrtl,library='eclrtl',entrypoint='rtlSetPackedSigned';",
+    "   setPackedUnsigned(noconst data1 src, unsigned8 value) : eclrtl,library='eclrtl',entrypoint='rtlSetPackedUnsigned';",
     "   unsigned4 getPackedSize(const data1 src) :  eclrtl,library='eclrtl',entrypoint='rtlGetPackedSize';",
 
     #if 0 // Not yet needed....
@@ -281,10 +280,10 @@ const char * cppSystemText[]  = {
     "   unsigned8 readSwapUInt5(const data1 src) :  eclrtl,pure,library='eclrtl',entrypoint='rtlReadSwapUInt5';",
     "   unsigned8 readSwapUInt6(const data1 src) :  eclrtl,pure,library='eclrtl',entrypoint='rtlReadSwapUInt6';",
     "   unsigned8 readSwapUInt7(const data1 src) :  eclrtl,pure,library='eclrtl',entrypoint='rtlReadSwapUInt7';",
-    "   writeSwapInt3(data1 src, unsigned4 value) : eclrtl,library='eclrtl',entrypoint='rtlWriteSwapInt3';",
-    "   writeSwapInt5(data1 src, unsigned8 value) : eclrtl,library='eclrtl',entrypoint='rtlWriteSwapInt5';",
-    "   writeSwapInt6(data1 src, unsigned8 value) : eclrtl,library='eclrtl',entrypoint='rtlWriteSwapInt6';",
-    "   writeSwapInt7(data1 src, unsigned8 value) : eclrtl,library='eclrtl',entrypoint='rtlWriteSwapInt7';",
+    "   writeSwapInt3(noconst data3 src, unsigned4 value) : eclrtl,library='eclrtl',entrypoint='rtlWriteSwapInt3';",
+    "   writeSwapInt5(noconst data5 src, unsigned8 value) : eclrtl,library='eclrtl',entrypoint='rtlWriteSwapInt5';",
+    "   writeSwapInt6(noconst data6 src, unsigned8 value) : eclrtl,library='eclrtl',entrypoint='rtlWriteSwapInt6';",
+    "   writeSwapInt7(noconst data7 src, unsigned8 value) : eclrtl,library='eclrtl',entrypoint='rtlWriteSwapInt7';",
     #endif
 
     "   integer2 revInt2(const data1 src) : eclrtl,pure,library='eclrtl',include,entrypoint='rtlRevInt2';",
@@ -323,12 +322,12 @@ const char * cppSystemText[]  = {
     "   DecSub() :  eclrtl,library='eclrtl',entrypoint='DecSub';",
     "   DecSubR() : eclrtl,library='eclrtl',entrypoint='DecSubR';",
     "   DecNegate() :   eclrtl,library='eclrtl',entrypoint='DecNegate';",
-    "   unsigned4 DecPopString(string tgt) :    eclrtl,library='eclrtl',entrypoint='DecPopString';",
-    "   DecPopVString(string tgt) : eclrtl,library='eclrtl',entrypoint='DecPopCString';",
+    "   unsigned4 DecPopString(noconst string tgt) :    eclrtl,library='eclrtl',entrypoint='DecPopString';",
+    "   DecPopVString(noconst string tgt) : eclrtl,library='eclrtl',entrypoint='DecPopCString';",
     "   varstring DecPopVStringX() :    eclrtl,library='eclrtl',entrypoint='DecPopCStringX';",
     "   integer8 DecPopInt64() :    eclrtl,library='eclrtl',entrypoint='DecPopInt64';",
-    "   DecPopDecimal(data1 tgt,unsigned1 len,unsigned1 prec) : eclrtl,library='eclrtl',entrypoint='DecPopDecimal';",
-    "   DecPopUDecimal(data1 tgt,unsigned1 len,unsigned1 prec) : eclrtl,library='eclrtl',entrypoint='DecPopUDecimal';",
+    "   DecPopDecimal(noconst data1 tgt,unsigned1 len,unsigned1 prec) : eclrtl,library='eclrtl',entrypoint='DecPopDecimal';",
+    "   DecPopUDecimal(noconst data1 tgt,unsigned1 len,unsigned1 prec) : eclrtl,library='eclrtl',entrypoint='DecPopUDecimal';",
     "   unsigned4 DecPopUlong() :   eclrtl,library='eclrtl',entrypoint='DecPopUlong';",
     "   real8 DecPopReal() :    eclrtl,library='eclrtl',entrypoint='DecPopReal';",
     "   DecPushString(const string tgt) :   eclrtl,library='eclrtl',entrypoint='DecPushString';",
@@ -401,14 +400,14 @@ const char * cppSystemText[]  = {
     "   unsigned8 hash64VUnicode(const varunicode src, unsigned8 initval) : eclrtl,pure,library='eclrtl',entrypoint='rtlHash64VUnicode';",
     "   unsigned8 hash64Utf8(const utf8 src, unsigned8 initval) :   eclrtl,pure,library='eclrtl',entrypoint='rtlHash64Utf8';",
 
-    "   hashMd5Init(data _state) :  eclrtl,entrypoint='rtlHashMd5Init';",
-    "   hashMd5Data(const data _value, data _state) :   eclrtl,entrypoint='rtlHashMd5Data';",
-    "   data16 hashMd5Finish(data _state) : eclrtl,entrypoint='rtlHashMd5Finish';",
+    "   hashMd5Init(noconst data _state) :  eclrtl,entrypoint='rtlHashMd5Init';",
+    "   hashMd5Data(const data _value, noconst data _state) :   eclrtl,entrypoint='rtlHashMd5Data';",
+    "   data16 hashMd5Finish(noconst data _state) : eclrtl,entrypoint='rtlHashMd5Finish';",
 
     "   boolean validReal(const data src) : eclrtl,pure,library='eclrtl',entrypoint='rtlIsValidReal';",
     "   real8 createRealNull() : eclrtl,pure,library='eclrtl',entrypoint='rtlCreateRealNull';",
 
-    "   deserializeRaw(data field, boolean o) : eclrtl,include='eclrtl.hpp',library='eclrtl',entrypoint='deserializeRaw';",
+    "   deserializeRaw(noconst data field, boolean o) : eclrtl,include='eclrtl.hpp',library='eclrtl',entrypoint='deserializeRaw';",
     "   data deserializeDataX(boolean o) :  eclrtl,include='eclrtl.hpp',library='eclrtl',entrypoint='deserializeDataX';",
     "   dataset deserializeDatasetX(boolean o) :    eclrtl,include='eclrtl.hpp',library='eclrtl',entrypoint='deserializeDataX';",
     "   _linkcounted_ dictionary deserializeDictionaryX(boolean _deserializer, boolean _input) : eclrtl,include='eclrtl.hpp',library='eclrtl',entrypoint='deserializeDictionaryX';",
@@ -562,10 +561,10 @@ const char * cppSystemText[]  = {
     "   set of unicode regexUStrMatchSet(const unicode _search) : method,pure,entrypoint='getMatchSet';"
 
     //clibrary functions that are called from the code generation
-    "   free(data1 src) : eclrtl,library='eclrtl',entrypoint='rtlFree';",
+    "   free(noconst data1 src) : eclrtl,library='eclrtl',entrypoint='rtlFree';",
     "   integer4 memcmp(const data1 target, const data1 src, unsigned4 len) : sys,pure,entrypoint='memcmp';",
-    "   data1 memcpy(data1 target, const data1 src, unsigned4 len): sys,entrypoint='memcpy';",
-    "   data1 memset(data1 target, integer4 fill, unsigned4 len) :  sys,entrypoint='memset';",
+    "   data1 memcpy(noconst data1 target, const data1 src, unsigned4 len): sys,entrypoint='memcpy';",
+    "   data1 memset(noconst data1 target, integer4 fill, unsigned4 len) :  sys,entrypoint='memset';",
     "   strcpy(const varstring1 target, const varstring1 src) : sys,entrypoint='strcpy';",
     "   unsigned4 strlen(const varstring1 src) :    sys,pure,entrypoint='strlen';",
 
@@ -628,17 +627,17 @@ const char * cppSystemText[]  = {
     "   utf8 utf8SubStrFTX(const utf8 src, unsigned4 from, unsigned4 to) : eclrtl,pure,library='eclrtl',entrypoint='rtlUtf8SubStrFTX';",
     "   utf8 utf8SubStrFX(const utf8 src, unsigned4 from) : eclrtl,pure,library='eclrtl',entrypoint='rtlUtf8SubStrFX';",
 
-    "   utf82Codepage(string tgt, const utf8 src, const varstring codepage) :   eclrtl,pure,include,library='eclrtl',entrypoint='rtlUtf8ToCodepage';",
-    "   utf82Data(data tgt, const utf8 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlUtf8ToData';",
-    "   utf82Unicode(unicode tgt, const utf8 src) : eclrtl,pure,library='eclrtl',entrypoint='rtlUtf8ToUnicode';",
-    "   utf8ToUtf8(utf8 tgt, const utf8 src) :  eclrtl,pure,library='eclrtl',entrypoint='rtlUtf8ToUtf8';",
+    "   utf82Codepage(noconst string tgt, const utf8 src, const varstring codepage) :   eclrtl,pure,include,library='eclrtl',entrypoint='rtlUtf8ToCodepage';",
+    "   utf82Data(noconst data tgt, const utf8 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlUtf8ToData';",
+    "   utf82Unicode(noconst unicode tgt, const utf8 src) : eclrtl,pure,library='eclrtl',entrypoint='rtlUtf8ToUnicode';",
+    "   utf8ToUtf8(noconst utf8 tgt, const utf8 src) :  eclrtl,pure,library='eclrtl',entrypoint='rtlUtf8ToUtf8';",
     "   string utf82CodepageX(const utf8 src, const varstring codepage) :   eclrtl,pure,library='eclrtl',entrypoint='rtlUtf8ToCodepageX';",
     "   data utf82DataX(const utf8 src) :   eclrtl,pure,library='eclrtl',entrypoint='rtlUtf8ToDataX';",
     "   unicode utf82UnicodeX(const utf8 src) : eclrtl,pure,library='eclrtl',entrypoint='rtlUtf8ToUnicodeX';",
     "   utf8 utf8ToUtf8X(const utf8 src) :  eclrtl,pure,library='eclrtl',entrypoint='rtlUtf8ToUtf8X';",
-    "   codepageToUtf8(utf8 tgt, const string src, const varstring codepage) :  eclrtl,pure,library='eclrtl',entrypoint='rtlCodepageToUtf8';",
+    "   codepageToUtf8(noconst utf8 tgt, const string src, const varstring codepage) :  eclrtl,pure,library='eclrtl',entrypoint='rtlCodepageToUtf8';",
     "   utf8 codepageToUtf8X(const string src, const varstring codepage) :  eclrtl,pure,library='eclrtl',entrypoint='rtlCodepageToUtf8X';",
-    "   unicodeToUtf8(utf8 tgt, const unicode src) :    eclrtl,pure,library='eclrtl',entrypoint='rtlUnicodeToUtf8';",
+    "   unicodeToUtf8(noconst utf8 tgt, const unicode src) :    eclrtl,pure,library='eclrtl',entrypoint='rtlUnicodeToUtf8';",
     "   utf8 unicodeToUtf8X(const unicode src) :    eclrtl,pure,library='eclrtl',entrypoint='rtlUnicodeToUtf8X';",
     "   unsigned4 utf8Size(const data src) : eclrtl,include,pure,library='eclrtl',entrypoint='rtlUtf8Size';", 
     "   unsigned4 utf8Length(const data src) : eclrtl,include,pure,library='eclrtl',entrypoint='rtlUtf8Length';", 
@@ -654,7 +653,7 @@ const char * cppSystemText[]  = {
     "   dataset getResultDataset(const varstring stepname, unsigned4 sequence, boolean xmltransformer, boolean csvtransformer) : ctxmethod,pure,entrypoint='getResultRaw';",    // an alias
     "   qstring getResultQString(const varstring stepname, unsigned4 sequence) : ctxmethod,pure,entrypoint='getResultQString';",
     "   string  getResultString(const varstring stepname, unsigned4 sequence) : ctxmethod,pure,entrypoint='getResultString';",
-    "   getResultStringF(string target, const varstring stepname, unsigned4 sequence) : ctxmethod,pure,entrypoint='getResultStringF';",
+    "   getResultStringF(noconst string target, const varstring stepname, unsigned4 sequence) : ctxmethod,pure,entrypoint='getResultStringF';",
     "   unicode getResultUnicode(const varstring stepname, unsigned4 sequence) : ctxmethod,pure,entrypoint='getResultUnicode';",
     "   varstring   getResultVarString(const varstring stepname, unsigned4 sequence) : ctxmethod,pure,entrypoint='getResultVarString';",
     "   varunicode  getResultVarUnicode(const varstring stepname, unsigned4 sequence) : ctxmethod,pure,entrypoint='getResultVarUnicode';",
@@ -723,23 +722,23 @@ const char * cppSystemText[]  = {
     "   killRange(const data1 lo, const data1 hi) : method,include='rtlkey.hpp',entrypoint='killRange';",
 
     "   boolean columnGetBool(const varstring name) : method,pure,entrypoint='getBool';",
-    "   columnGetData(data result, const varstring name) : method,pure,entrypoint='getData';",
+    "   columnGetData(noconst data result, const varstring name) : method,pure,entrypoint='getData';",
     "   data columnGetDataX(const varstring name) : method,pure,entrypoint='getDataX';",
     "   integer columnGetInt(const varstring name) : method,pure,entrypoint='getInt';",
     "   boolean columnGetSetIsAll(const varstring name) : method,pure,entrypoint='getIsSetAll';",
-    "   columnGetQString(qstring result, const varstring name) : method,pure,entrypoint='getQString';",
-    "   columnGetString(string result, const varstring name) : method,pure,entrypoint='getString';",
+    "   columnGetQString(noconst qstring result, const varstring name) : method,pure,entrypoint='getQString';",
+    "   columnGetString(noconst string result, const varstring name) : method,pure,entrypoint='getString';",
     "   string columnGetStringX(const varstring name) : method,pure,entrypoint='getStringX';",
     "   unicode columnGetUnicodeX(const varstring name) : method,pure,entrypoint='getUnicodeX';",
     "   utf8 columnGetUtf8X(const varstring name) : method,pure,entrypoint='getUtf8X';",
 
     "   boolean columnReadBool(const varstring name, boolean _default) : method,pure,entrypoint='readBool';",
-    "   columnReadData(data result, const varstring name, const data _default) : method,pure,entrypoint='readData';",
+    "   columnReadData(noconst data result, const varstring name, const data _default) : method,pure,entrypoint='readData';",
     "   data columnReadDataX(const varstring name, const data _default) : method,pure,entrypoint='readDataX';",
     "   integer columnReadInt(const varstring name, integer _default) : method,pure,entrypoint='readInt';",
     "   boolean columnReadSetIsAll(const varstring name, boolean _default) : method,pure,entrypoint='readIsSetAll';",
-    "   columnReadQString(qstring result, const varstring name, const qstring _default) : method,pure,entrypoint='readQString';",
-    "   columnReadString(string result, const varstring name, const string _default) : method,pure,entrypoint='readString';",
+    "   columnReadQString(noconst qstring result, const varstring name, const qstring _default) : method,pure,entrypoint='readQString';",
+    "   columnReadString(noconst string result, const varstring name, const string _default) : method,pure,entrypoint='readString';",
     "   string columnReadStringX(const varstring name, const string _default) : method,pure,entrypoint='readStringX';",
     "   unicode columnReadUnicodeX(const varstring name, const unicode _default) : method,pure,entrypoint='readUnicodeX';",
     "   utf8 columnReadUtf8X(const varstring name, const utf8 _default) : method,pure,entrypoint='readUtf8X';",
@@ -814,9 +813,9 @@ const char * cppSystemText[]  = {
     "   row(dummyRecord) deserializerPeek(unsigned4 _maxSize) : omethod,entrypoint='peek';",
     "   unsigned8 deserializerBeginNested() : omethod,entrypoint='beginNested';",
     "   boolean deserializerFinishedNested(unsigned8 pos) : omethod,entrypoint='finishedNested';",
-    "   unsigned4 deserializerReadN(data _target) : omethod,entrypoint='read';",
+    "   unsigned4 deserializerReadN(noconst data _target) : omethod,entrypoint='read';",
     "   unsigned4 deserializerReadSize() : omethod,entrypoint='readSize';",
-    "   unsigned4 deserializerReadPackedInt(data _target) : omethod,entrypoint='readPackedInt';",
+    "   unsigned4 deserializerReadPackedInt(noconst data _target) : omethod,entrypoint='readPackedInt';",
     "   unsigned4 deserializerReadUtf8(boolean rowBuilder, unsigned4 offset, unsigned4 fixedSize, unsigned4 len) : omethod,entrypoint='readUtf8';",
     "   unsigned4 deserializerReadVStr(boolean rowBuilder, unsigned4 offset, unsigned4 fixedSize) : omethod,entrypoint='readVStr';",
     "   unsigned4 deserializerReadVUni(boolean rowBuilder, unsigned4 offset, unsigned4 fixedSize) : omethod,entrypoint='readVUni';",

+ 0 - 36
ecl/hqlcpp/hqlcpputil.cpp

@@ -407,42 +407,6 @@ IHqlExpression * projectCreateSetDataset(IHqlExpression * expr)
     return LINK(expr);
 }
 
-IHqlExpression * mapInternalFunctionParameters(IHqlExpression * expr)
-{
-    switch (expr->getOperator())
-    {
-    case no_sortlist:
-        {
-            HqlExprArray args;
-            ForEachChild(i, expr)
-                args.append(*mapInternalFunctionParameters(expr->queryChild(i)));
-            return cloneOrLink(expr, args);
-        }
-    case no_param:
-        {
-            ITypeInfo * type = expr->queryType();
-            //String parameters need to be passed as c++ const string parameters
-            switch (type->getTypeCode())
-            {
-            case type_string:
-            case type_varstring:
-            case type_data:
-            case type_qstring:
-            case type_unicode:
-            case type_utf8:
-            case type_varunicode:
-                if (!expr->hasAttribute(constAtom))
-                    return appendOwnedOperand(expr, createAttribute(constAtom));
-                break;
-            }
-            break;
-        }
-    }
-
-    return LINK(expr);
-}
-
-
 bool mustInitializeField(IHqlExpression * field)
 {
     if (hasLinkCountedModifier(field))

+ 0 - 1
ecl/hqlcpp/hqlcpputil.hpp

@@ -48,7 +48,6 @@ extern IHqlExpression * ensurePositiveOrZeroInt64(IHqlExpression * expr);
 extern void getOutputLibraryName(SCMStringBuffer & libraryName, IConstWorkUnit * wu);
 extern bool canCreateTemporary(IHqlExpression * expr);
 extern IHqlExpression * projectCreateSetDataset(IHqlExpression * createsetExpr);
-extern IHqlExpression * mapInternalFunctionParameters(IHqlExpression * expr);
 
 extern bool mustInitializeField(IHqlExpression * field);
 extern bool worthGeneratingRowAsSingleActivity(IHqlExpression * expr);

+ 2 - 7
ecl/hqlcpp/hqlttcpp.cpp

@@ -6190,12 +6190,8 @@ IHqlExpression * WorkflowTransformer::transformInternalFunction(IHqlExpression *
         funcname.append("_").append(newFuncDef->queryName()).toLowerCase();
     OwnedHqlExpr funcNameExpr = createConstant(funcname);
 
-    IHqlExpression * formals = newFuncDef->queryChild(1);
-    OwnedHqlExpr newFormals = mapInternalFunctionParameters(formals);
-
     HqlExprArray bodyArgs;
-    bodyArgs.append(*replaceParameters(ecl, formals, newFormals));
-    unwindChildren(bodyArgs, body, 1);
+    unwindChildren(bodyArgs, body, 0);
     bodyArgs.append(*createLocalAttribute());
     bodyArgs.append(*createExprAttribute(entrypointAtom, LINK(funcNameExpr)));
     OwnedHqlExpr newBody = body->clone(bodyArgs);
@@ -6204,8 +6200,7 @@ IHqlExpression * WorkflowTransformer::transformInternalFunction(IHqlExpression *
 
     HqlExprArray funcdefArgs;
     funcdefArgs.append(*LINK(newBody));
-    funcdefArgs.append(*LINK(newFormals));
-    unwindChildren(funcdefArgs, newFuncDef, 2);
+    unwindChildren(funcdefArgs, newFuncDef, 1);
     OwnedHqlExpr namedFuncDef = newFuncDef->clone(funcdefArgs);
     inheritDependencies(namedFuncDef);
 

+ 8 - 5
ecl/hqlcpp/hqlwcpp.cpp

@@ -804,7 +804,7 @@ void HqlCppWriter::generateParamCpp(IHqlExpression * param, IHqlExpression * att
     paramNameText.append(paramName).toLowerCase();
 
     bool isOut = false;
-    bool isConst = false;
+    bool isConst = true;
     unsigned maxAttr = param->numChildren();
     unsigned attrIdx;
     for (attrIdx = 0; attrIdx < maxAttr; attrIdx++)
@@ -812,8 +812,8 @@ void HqlCppWriter::generateParamCpp(IHqlExpression * param, IHqlExpression * att
         IHqlExpression * attr = param->queryChild(attrIdx);
         if (attr->isAttribute())
         {
-            if (attr->queryName() == constAtom)
-                isConst = true;
+            if (attr->queryName() == noConstAtom)
+                isConst = false;
             else if (attr->queryName() == outAtom)
                 isOut = true;
         }
@@ -950,10 +950,13 @@ void HqlCppWriter::generateParamCpp(IHqlExpression * param, IHqlExpression * att
         }
         // Other set types just fall through and will be treated like other types.
     case type_qstring: case type_string: case type_varstring: case type_data:
+    case type_utf8: case type_unicode: case type_varunicode:
+    case type_row:
+        if (isConst)
+            out.append("const ");
+        /* no break */
     default:
         {
-            if (isConst)
-                out.append("const ");
             Owned<ITypeInfo> argType = LINK(paramType);
             if (argType->getTypeCode() == type_function)
                 argType.setown(makePointerType(LINK(argType)));