summaryrefslogtreecommitdiff
path: root/swift/src
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2019-04-18 13:19:28 +0200
committerJose <jose@zeroc.com>2019-04-18 13:19:28 +0200
commite7ccf2ae3f0b5e01d1be3869c63bdcfebc97921c (patch)
tree8b9aefba5d8f17666a82627f288c4c56e05b140a /swift/src
parentIce/location test (diff)
downloadice-e7ccf2ae3f0b5e01d1be3869c63bdcfebc97921c.tar.bz2
ice-e7ccf2ae3f0b5e01d1be3869c63bdcfebc97921c.tar.xz
ice-e7ccf2ae3f0b5e01d1be3869c63bdcfebc97921c.zip
Proxy marshal fixes
Diffstat (limited to 'swift/src')
-rw-r--r--swift/src/Ice/OutputStream.swift2
-rw-r--r--swift/src/Ice/Proxy.swift2
-rw-r--r--swift/src/IceObjc/IceObjcObjectPrx.h4
-rw-r--r--swift/src/IceObjc/ObjectPrx.mm4
4 files changed, 8 insertions, 4 deletions
diff --git a/swift/src/Ice/OutputStream.swift b/swift/src/Ice/OutputStream.swift
index c23a802cc72..38e27e5536a 100644
--- a/swift/src/Ice/OutputStream.swift
+++ b/swift/src/Ice/OutputStream.swift
@@ -7,7 +7,7 @@ import IceObjc
public class OutputStream {
private var buf: Buffer
private var communicator: Communicator
- private var encoding: EncodingVersion
+ var encoding: EncodingVersion
private var encoding_1_0: Bool
private var format: FormatType = FormatType.DefaultFormat
diff --git a/swift/src/Ice/Proxy.swift b/swift/src/Ice/Proxy.swift
index 97eefa9301e..a99b1b03e6a 100644
--- a/swift/src/Ice/Proxy.swift
+++ b/swift/src/Ice/Proxy.swift
@@ -599,7 +599,7 @@ open class _ObjectPrxI: ObjectPrx {
}
public func ice_write(to os: OutputStream) {
- _handle.iceWrite(os)
+ _handle.iceWrite(os, encodingMajor: os.encoding.major, encodingMinor: os.encoding.minor)
}
public func ice_toString() -> String {
diff --git a/swift/src/IceObjc/IceObjcObjectPrx.h b/swift/src/IceObjc/IceObjcObjectPrx.h
index 67c7ca0fcf8..822baee9da6 100644
--- a/swift/src/IceObjc/IceObjcObjectPrx.h
+++ b/swift/src/IceObjc/IceObjcObjectPrx.h
@@ -90,7 +90,9 @@ NS_ASSUME_NONNULL_BEGIN
bytesRead:(NSInteger*)bytesRead
error:(NSError* _Nullable * _Nullable)error;
--(void) iceWrite:(id<ICEOutputStreamHelper>)os;
+-(void) iceWrite:(id<ICEOutputStreamHelper>)os
+ encodingMajor:(uint8_t)encodingMajor
+ encodingMinor:(uint8_t)encodingMinor;
-(nullable ICEInputStream*) iceInvoke:(NSString* _Nonnull)op
mode:(uint8_t)mode
diff --git a/swift/src/IceObjc/ObjectPrx.mm b/swift/src/IceObjc/ObjectPrx.mm
index 868537c0027..f9789a11a52 100644
--- a/swift/src/IceObjc/ObjectPrx.mm
+++ b/swift/src/IceObjc/ObjectPrx.mm
@@ -564,12 +564,14 @@ encodingMinor:(uint8_t)minor
}
-(void) iceWrite:(id<ICEOutputStreamHelper>)os
+ encodingMajor:(uint8_t)encodingMajor
+ encodingMinor:(uint8_t)encodingMinor
{
//
// Marshal a proxy into a stream and return the encoded bytes.
//
auto communicator = _prx->ice_getCommunicator();
- auto encoding = _prx->ice_getEncodingVersion();
+ Ice::EncodingVersion encoding { encodingMajor, encodingMinor };
Ice::OutputStream out(communicator, encoding);
out.write(_prx);
std::pair<const Ice::Byte*, const Ice::Byte*> p = out.finished();