diff options
Diffstat (limited to 'cpp')
-rwxr-xr-x | cpp/src/Slice/RubyUtil.cpp | 4 | ||||
-rw-r--r-- | cpp/src/slice2php/Main.cpp | 11 |
2 files changed, 10 insertions, 5 deletions
diff --git a/cpp/src/Slice/RubyUtil.cpp b/cpp/src/Slice/RubyUtil.cpp index c9a3bae5820..d5f8f771a13 100755 --- a/cpp/src/Slice/RubyUtil.cpp +++ b/cpp/src/Slice/RubyUtil.cpp @@ -912,7 +912,9 @@ Slice::Ruby::CodeVisitor::visitExceptionStart(const ExceptionPtr& p) // // Emit the type information. // - _out << sp << nl << "T_" << name << " = ::Ice::__defineException('" << scoped << "', " << name << ", "; + const bool preserved = p->hasMetaData("preserve-slice") || p->inheritsMetaData("preserve-slice"); + _out << sp << nl << "T_" << name << " = ::Ice::__defineException('" << scoped << "', " << name << ", " + << (preserved ? "true" : "false") << ", "; if(!base) { _out << "nil"; diff --git a/cpp/src/slice2php/Main.cpp b/cpp/src/slice2php/Main.cpp index 7a3209ad287..a30a16eca2d 100644 --- a/cpp/src/slice2php/Main.cpp +++ b/cpp/src/slice2php/Main.cpp @@ -388,8 +388,9 @@ CodeVisitor::visitClassDefStart(const ClassDefPtr& p) // // Emit the type information. // + const bool preserved = p->hasMetaData("preserve-slice") || p->inheritsMetaData("preserve-slice"); _out << sp << nl << type << " = IcePHP_defineClass('" << scoped << "', '" << escapeName(abs) << "', " - << (isAbstract ? "true" : "false") << ", "; + << (isAbstract ? "true" : "false") << ", " << (preserved ? "true" : "false") << ", "; if(!base) { _out << "$Ice__t_Object"; @@ -459,7 +460,7 @@ CodeVisitor::visitClassDefStart(const ClassDefPtr& p) // // Define each operation. The arguments to IcePHP_defineOperation are: // - // $ClassType, 'opName', Mode, SendMode, (InParams), (OutParams), ReturnType, (Exceptions) + // $ClassType, 'opName', Mode, SendMode, FormatType, (InParams), (OutParams), ReturnType, (Exceptions) // // where InParams and OutParams are arrays of type descriptions, and Exceptions // is an array of exception type ids. @@ -475,7 +476,7 @@ CodeVisitor::visitClassDefStart(const ClassDefPtr& p) _out << nl << "IcePHP_defineOperation(" << type << ", '" << (*oli)->name() << "', " << getOperationMode((*oli)->mode(), _ns) << ", " << getOperationMode((*oli)->sendMode(), _ns) - << ", "; + << ", " << static_cast<int>((*oli)->format()) << ", "; for(t = params.begin(), count = 0; t != params.end(); ++t) { if(!(*t)->isOutParam()) @@ -671,7 +672,9 @@ CodeVisitor::visitExceptionStart(const ExceptionPtr& p) // // Emit the type information. // - _out << sp << nl << type << " = IcePHP_defineException('" << scoped << "', '" << escapeName(abs) << "', "; + const bool preserved = p->hasMetaData("preserve-slice") || p->inheritsMetaData("preserve-slice"); + _out << sp << nl << type << " = IcePHP_defineException('" << scoped << "', '" << escapeName(abs) << "', " + << (preserved ? "true" : "false") << ", "; if(!base) { _out << "null"; |