From 54d8f3fb0d3d53f851051980f1bc941c4e39a60f Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Thu, 6 Jul 2017 00:18:03 +0200 Subject: Added Ice::UserException::ice_getSlicedData and Ice::UnkownSlicedValue::ice_id methods --- cpp/src/slice2objc/Gen.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cpp/src/slice2objc/Gen.cpp') diff --git a/cpp/src/slice2objc/Gen.cpp b/cpp/src/slice2objc/Gen.cpp index 3aba530c16b..6e34a182f54 100644 --- a/cpp/src/slice2objc/Gen.cpp +++ b/cpp/src/slice2objc/Gen.cpp @@ -1157,7 +1157,7 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p) { _M << nl << "-(id) ice_getSlicedData"; _M << sb; - _M << nl << "return iceSlicedData_;"; + _M << nl << "return ICE_AUTORELEASE(ICE_RETAIN(iceSlicedData_));"; _M << eb; _M << nl << "-(void) iceWrite:(id)ostr"; @@ -1404,6 +1404,11 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) if(preserved && !basePreserved) { + _M << nl << nl << "-(id) ice_getSlicedData"; + _M << sb; + _M << nl << "return ICE_AUTORELEASE(ICE_RETAIN(slicedData_));"; + _M << eb; + _M << nl << nl << "-(void) iceWrite:(id)ostr"; _M << sb; _M << nl << "[ostr startException:slicedData_];"; -- cgit v1.2.3