diff options
author | Michi Henning <michi@zeroc.com> | 2003-05-19 00:54:05 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2003-05-19 00:54:05 +0000 |
commit | d48f77a15aa2184d048b664d8d0287bfc430e0f8 (patch) | |
tree | bd51fe2f8a8d97a0bd3fa78788e154a89450a7cd /cpp/src/slice2cpp/Gen.cpp | |
parent | Use %x to display the date (diff) | |
download | ice-d48f77a15aa2184d048b664d8d0287bfc430e0f8.tar.bz2 ice-d48f77a15aa2184d048b664d8d0287bfc430e0f8.tar.xz ice-d48f77a15aa2184d048b664d8d0287bfc430e0f8.zip |
- Fixed a bug in the code generator for dictionaries with class values.
- Added more support for Java slicing.
- Changed config/Make.rules: "make depend" was calling slice2cpp with
ICECPPFLAGS, not SLICE2CPPFLAGS. This meant that "make depend" was
invoking slice2cpp with options that were potentially different from
those passed for normal compilation of slice files, which could lead to
inconsistencies.
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index c8174f1467b..f5f2b8d0510 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -866,8 +866,8 @@ Slice::Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p) C << nl << "::std::pair<const " << ks << ", " << vs << "> pair;"; string pf = string("const_cast<") + ks + "&>(pair.first)"; writeMarshalUnmarshalCode(C, keyType, pf, false); - writeMarshalUnmarshalCode(C, valueType, "pair.second", false); - C << nl << "v.insert(v.end(), pair);"; + C << nl << scoped << "::iterator __i = v.insert(v.end(), pair);"; + writeMarshalUnmarshalCode(C, valueType, "__i->second", false); C << eb; C << eb; @@ -2670,12 +2670,12 @@ Slice::Gen::ObjectVisitor::visitOperation(const OperationPtr& p) } writeAllocateCode(C, inParams, 0); writeUnmarshalCode(C, inParams, 0); - C << nl << classScopedAMD << '_' << name << "Ptr __cb = new IceAsync" << classScopedAMD << '_' << name - << "(__in);"; if(p->sendsClasses()) { C << nl << "__is->readPendingObjects();"; } + C << nl << classScopedAMD << '_' << name << "Ptr __cb = new IceAsync" << classScopedAMD << '_' << name + << "(__in);"; C << nl << "try"; C << sb; C << nl << name << "_async" << argsAMD << ';'; |