summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-10-12 17:10:39 +0200
committerBenoit Foucher <benoit@zeroc.com>2017-10-12 17:10:39 +0200
commit3a55ebb51b8914b60d308a0535d9abf97567138d (patch)
tree7539781f29da04b1e33ca77ada31d326faaadd7c
parentICE-8378 - cloneWithPrefix cause System.IO.IOException: with IceBox and Ice.F... (diff)
downloadice-3.7.0-xcode9.tar.bz2
ice-3.7.0-xcode9.tar.xz
ice-3.7.0-xcode9.zip
Fixed generated code warnings showing up with Objective-C and Xcode 9.0 (ICE-8540)v3.7.0-xcode9
-rw-r--r--CHANGELOG-3.7.md14
-rw-r--r--cpp/src/slice2objc/Gen.cpp4
-rw-r--r--cpp/src/slice2objc/ObjCUtil.cpp2
3 files changed, 16 insertions, 4 deletions
diff --git a/CHANGELOG-3.7.md b/CHANGELOG-3.7.md
index e3bd743c71f..512982562f7 100644
--- a/CHANGELOG-3.7.md
+++ b/CHANGELOG-3.7.md
@@ -8,17 +8,29 @@ We recommend that you use the release notes as a guide for migrating your
applications to this release, and the manual for complete details on a
particular aspect of Ice.
+- [Changes in Ice 3.7.0 Hotfix for Xcode 9](#changes-in-ice-370-hotfix-for-xcode-9)
+ - [Objective-C Changes](#objective-c-changes)
- [Changes in Ice 3.7.0](#changes-in-ice-370)
- [General Changes](#general-changes)
- [C++ Changes](#c-changes)
- [C# Changes](#c-changes-1)
- [Java Changes](#java-changes)
- [JavaScript Changes](#javascript-changes)
- - [Objective-C Changes](#objective-c-changes)
+ - [Objective-C Changes](#objective-c-changes-1)
- [PHP Changes](#php-changes)
- [Python Changes](#python-changes)
- [Ruby Changes](#ruby-changes)
+# Changes in Ice 3.7.0 Hotfix for Xcode 9
+
+These are the changes since Ice 3.7.0 included in this release.
+
+## Objective-C Changes
+
+- Fixed the generated code to specify the __autoreleasing qualifier on
+ parameters returned by reference. Xcode 9.0 now emits a warning if this
+ qualifier is omitted.
+
# Changes in Ice 3.7.0
These are the changes since the Ice 3.6 release or snapshot described in
diff --git a/cpp/src/slice2objc/Gen.cpp b/cpp/src/slice2objc/Gen.cpp
index c2ff2e2bca9..1c4b7e58943 100644
--- a/cpp/src/slice2objc/Gen.cpp
+++ b/cpp/src/slice2objc/Gen.cpp
@@ -449,7 +449,7 @@ Slice::ObjCVisitor::getParams(const OperationPtr& op, bool internal) const
string typeString;
if((*q)->isOutParam())
{
- typeString = outTypeToString(type, (*q)->optional(), false, true);
+ typeString = outTypeToString(type, (*q)->optional(), true, true);
}
else
{
@@ -524,7 +524,7 @@ Slice::ObjCVisitor::getUnmarshalParams(const OperationPtr& op, bool internal) co
{
result += " " + getParamId(*q);
}
- result += ":(" + outTypeToString(type, (*q)->optional(), false, true) + ")" + getParamName(*q, internal);
+ result += ":(" + outTypeToString(type, (*q)->optional(), true, true) + ")" + getParamName(*q, internal);
}
}
return result;
diff --git a/cpp/src/slice2objc/ObjCUtil.cpp b/cpp/src/slice2objc/ObjCUtil.cpp
index 253519c837a..d5bf0e6d9c3 100644
--- a/cpp/src/slice2objc/ObjCUtil.cpp
+++ b/cpp/src/slice2objc/ObjCUtil.cpp
@@ -406,7 +406,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";
}