diff options
author | Bernard Normier <bernard@zeroc.com> | 2016-12-14 14:02:37 -0500 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2016-12-14 14:02:37 -0500 |
commit | 006bdff840ed5c834a6640c1690844d38cdafff4 (patch) | |
tree | 8116d1c1bb38b4fc8dc6c6178b0353f1029c0e07 /cpp/src/slice2js/JsUtil.cpp | |
parent | Fixes to JS test scripts and more work on iOS C++ controller (diff) | |
download | ice-006bdff840ed5c834a6640c1690844d38cdafff4.tar.bz2 ice-006bdff840ed5c834a6640c1690844d38cdafff4.tar.xz ice-006bdff840ed5c834a6640c1690844d38cdafff4.zip |
Removed or replaced double underscores in Ice for JavaScript
Diffstat (limited to 'cpp/src/slice2js/JsUtil.cpp')
-rw-r--r-- | cpp/src/slice2js/JsUtil.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/cpp/src/slice2js/JsUtil.cpp b/cpp/src/slice2js/JsUtil.cpp index 787c47d981f..641cc7c5632 100644 --- a/cpp/src/slice2js/JsUtil.cpp +++ b/cpp/src/slice2js/JsUtil.cpp @@ -388,7 +388,7 @@ Slice::JsGenerator::writeMarshalUnmarshalCode(Output &out, const string& param, bool marshal) { - string stream = marshal ? "__os" : "__is"; + string stream = marshal ? "ostr" : "istr"; BuiltinPtr builtin = BuiltinPtr::dynamicCast(type); if(builtin) @@ -521,11 +521,11 @@ Slice::JsGenerator::writeMarshalUnmarshalCode(Output &out, { if(marshal) { - out << nl << typeToString(type) << ".__write(" << stream << ", " << param << ");"; + out << nl << typeToString(type) << "._write(" << stream << ", " << param << ");"; } else { - out << nl << param << " = " << typeToString(type) << ".__read(" << stream << ");"; + out << nl << param << " = " << typeToString(type) << "._read(" << stream << ");"; } return; } @@ -551,7 +551,7 @@ Slice::JsGenerator::writeMarshalUnmarshalCode(Output &out, } else { - out << nl << stream << ".readValue(__o => " << param << " = __o, " << typeToString(type) << ");"; + out << nl << stream << ".readValue(obj => " << param << " = obj, " << typeToString(type) << ");"; } return; } @@ -579,7 +579,7 @@ Slice::JsGenerator::writeOptionalMarshalUnmarshalCode(Output &out, int tag, bool marshal) { - string stream = marshal ? "__os" : "__is"; + string stream = marshal ? "ostr" : "istr"; if(isClassType(type)) { @@ -589,7 +589,7 @@ Slice::JsGenerator::writeOptionalMarshalUnmarshalCode(Output &out, } else { - out << nl << stream << ".readOptionalValue(" << tag << ", __o => " << param << " = __o, " + out << nl << stream << ".readOptionalValue(" << tag << ", obj => " << param << " = obj, " << typeToString(type) << ");"; } return; @@ -599,11 +599,11 @@ Slice::JsGenerator::writeOptionalMarshalUnmarshalCode(Output &out, { if(marshal) { - out << nl << typeToString(type) <<".__writeOpt(" << stream << ", " << tag << ", " << param << ");"; + out << nl << typeToString(type) <<"._writeOpt(" << stream << ", " << tag << ", " << param << ");"; } else { - out << nl << param << " = " << typeToString(type) << ".__readOpt(" << stream << ", " << tag << ");"; + out << nl << param << " = " << typeToString(type) << "._readOpt(" << stream << ", " << tag << ");"; } return; } @@ -677,7 +677,7 @@ Slice::JsGenerator::getHelper(const TypePtr& type) if(EnumPtr::dynamicCast(type)) { - return typeToString(type) + ".__helper"; + return typeToString(type) + "._helper"; } if(ProxyPtr::dynamicCast(type) || StructPtr::dynamicCast(type)) |