diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Slice/ObjCUtil.cpp | 2 | ||||
-rw-r--r-- | cpp/src/slice2objc/Gen.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/Slice/ObjCUtil.cpp b/cpp/src/Slice/ObjCUtil.cpp index e9001855f06..ab8dca7aa73 100644 --- a/cpp/src/Slice/ObjCUtil.cpp +++ b/cpp/src/Slice/ObjCUtil.cpp @@ -388,7 +388,7 @@ Slice::ObjCGenerator::outTypeToString(const TypePtr& type, bool optional, bool a s += "*"; } } - if(autoreleasing && !isValueType(type)) + if(autoreleasing && (!isValueType(type) || optional)) { s += " ICE_AUTORELEASING_QUALIFIER"; } diff --git a/cpp/src/slice2objc/Gen.cpp b/cpp/src/slice2objc/Gen.cpp index 80135073987..443f4598c05 100644 --- a/cpp/src/slice2objc/Gen.cpp +++ b/cpp/src/slice2objc/Gen.cpp @@ -436,7 +436,7 @@ Slice::ObjCVisitor::getParams(const OperationPtr& op) const string typeString; if((*q)->isOutParam()) { - typeString = outTypeToString(type, (*q)->optional(), false, true); + typeString = outTypeToString(type, (*q)->optional(), true, true); } else { @@ -485,7 +485,7 @@ Slice::ObjCVisitor::getUnmarshalParams(const OperationPtr& op) const { result += " " + getParamId(*q); } - result += ":(" + outTypeToString(type, (*q)->optional(), false, true) + ")" + fixId((*q)->name()); + result += ":(" + outTypeToString(type, (*q)->optional(), true, true) + ")" + fixId((*q)->name()); } } return result; |