diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/include/Ice/BasicStream.h | 27 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 77 |
2 files changed, 91 insertions, 13 deletions
diff --git a/cpp/include/Ice/BasicStream.h b/cpp/include/Ice/BasicStream.h index 1fc8586fad8..ce075f27b72 100644 --- a/cpp/include/Ice/BasicStream.h +++ b/cpp/include/Ice/BasicStream.h @@ -139,23 +139,29 @@ public: void writePendingObjects(); void readPendingObjects(); -private: - - // - // Optimization. The instance may not be deleted while a - // stack-allocated BasicStream still holds it. - // - Instance* _instance; - struct PatchEntry { + struct PatchEntry + { PatchFunc patchFunc; void* patchAddr; }; + typedef std::vector<PatchEntry> PatchList; typedef std::map<Ice::Int, PatchList> PatchMap; typedef std::map<Ice::Int, Ice::ObjectPtr> IndexToPtrMap; typedef std::map<Ice::Int, std::string> TypeIdReadMap; - + + typedef std::map<Ice::ObjectPtr, Ice::Int> PtrToIndexMap; + typedef std::map<std::string, Ice::Int> TypeIdWriteMap; + +private: + + // + // Optimization. The instance may not be deleted while a + // stack-allocated BasicStream still holds it. + // + Instance* _instance; + class ICE_API ReadEncaps { public: @@ -172,9 +178,6 @@ private: TypeIdReadMap* typeIdMap; }; - typedef std::map<Ice::ObjectPtr, Ice::Int> PtrToIndexMap; - typedef std::map<std::string, Ice::Int> TypeIdWriteMap; - class ICE_API WriteEncaps { public: diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index d3b940ea33b..e95f8d33beb 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -1311,7 +1311,23 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p) ParamDeclList paramList = p->parameters(); for(ParamDeclList::const_iterator q = paramList.begin(); q != paramList.end(); ++q) { +#if defined(__SUNPRO_CC) && (__SUNPRO_CC==0x550) + // + // Work around for Sun CC 5.5 bug #4853566 + // + string typeString; + if((*q)->isOutParam()) + { + typeString = outputTypeToString((*q)->type()); + } + else + { + typeString = inputTypeToString((*q)->type()); + } +#else string typeString = (*q)->isOutParam() ? outputTypeToString((*q)->type()) : inputTypeToString((*q)->type()); +#endif + string paramName = fixKwd((*q)->name()); params += typeString; @@ -1524,8 +1540,22 @@ Slice::Gen::DelegateVisitor::visitOperation(const OperationPtr& p) ParamDeclList paramList = p->parameters(); for(ParamDeclList::const_iterator q = paramList.begin(); q != paramList.end(); ++q) { +#if defined(__SUNPRO_CC) && (__SUNPRO_CC==0x550) + // + // Work around for Sun CC 5.5 bug #4853566 + // + string typeString; + if((*q)->isOutParam()) + { + typeString = outputTypeToString((*q)->type()); + } + else + { + typeString = inputTypeToString((*q)->type()); + } +#else string typeString = (*q)->isOutParam() ? outputTypeToString((*q)->type()) : inputTypeToString((*q)->type()); - +#endif params += typeString; params += ", "; @@ -1896,7 +1926,22 @@ Slice::Gen::DelegateDVisitor::visitOperation(const OperationPtr& p) ParamDeclList paramList = p->parameters(); for(ParamDeclList::const_iterator q = paramList.begin(); q != paramList.end(); ++q) { +#if defined(__SUNPRO_CC) && (__SUNPRO_CC==0x550) + // + // Work around for Sun CC 5.5 bug #4853566 + // + string typeString; + if((*q)->isOutParam()) + { + typeString = outputTypeToString((*q)->type()); + } + else + { + typeString = inputTypeToString((*q)->type()); + } +#else string typeString = (*q)->isOutParam() ? outputTypeToString((*q)->type()) : inputTypeToString((*q)->type()); +#endif string paramName = fixKwd((*q)->name()); params += typeString; @@ -3323,8 +3368,23 @@ Slice::Gen::ImplVisitor::visitClassDefStart(const ClassDefPtr& p) { H << ',' << nl; } +#if defined(__SUNPRO_CC) && (__SUNPRO_CC==0x550) + // + // Work around for Sun CC 5.5 bug #4853566 + // + string typeString; + if((*q)->isOutParam()) + { + typeString = outputTypeToString((*q)->type()); + } + else + { + typeString = inputTypeToString((*q)->type()); + } +#else string typeString = (*q)->isOutParam() ? outputTypeToString((*q)->type()) : inputTypeToString((*q)->type()); +#endif H << typeString; } if(!p->isLocal()) @@ -3349,8 +3409,23 @@ Slice::Gen::ImplVisitor::visitClassDefStart(const ClassDefPtr& p) { C << ',' << nl; } +#if defined(__SUNPRO_CC) && (__SUNPRO_CC==0x550) + // + // Work around for Sun CC 5.5 bug #4853566 + // + string typeString; + if((*q)->isOutParam()) + { + typeString = outputTypeToString((*q)->type()); + } + else + { + typeString = inputTypeToString((*q)->type()); + } +#else string typeString = (*q)->isOutParam() ? outputTypeToString((*q)->type()) : inputTypeToString((*q)->type()); +#endif C << typeString << ' ' << fixKwd((*q)->name()); } if(!p->isLocal()) |