diff options
author | Jose <jose@zeroc.com> | 2019-03-15 23:18:14 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2019-03-15 23:18:14 +0100 |
commit | 57f2bf98ce0bdbf77897aff72bce7b0b83d33fa2 (patch) | |
tree | a708ef809414f1fb10ecc61b79cfa0f7d6caefed /swift/src | |
parent | Regenerate Xcode projects (diff) | |
download | ice-57f2bf98ce0bdbf77897aff72bce7b0b83d33fa2.tar.bz2 ice-57f2bf98ce0bdbf77897aff72bce7b0b83d33fa2.tar.xz ice-57f2bf98ce0bdbf77897aff72bce7b0b83d33fa2.zip |
Fix for Proxies and local generated methods
Diffstat (limited to 'swift/src')
-rw-r--r-- | swift/src/Ice/CommunicatorI.swift | 22 | ||||
-rw-r--r-- | swift/src/Ice/ConnectionI.swift | 12 | ||||
-rw-r--r-- | swift/src/Ice/Globals.swift | 4 | ||||
-rw-r--r-- | swift/src/Ice/ImplicitContextI.swift | 8 | ||||
-rw-r--r-- | swift/src/Ice/InputStream.swift | 4 | ||||
-rw-r--r-- | swift/src/Ice/LoggerI.swift | 10 | ||||
-rw-r--r-- | swift/src/Ice/LoggerWrapper.swift | 32 | ||||
-rw-r--r-- | swift/src/Ice/PropertiesI.swift | 12 | ||||
-rw-r--r-- | swift/src/Ice/Proxy.swift | 80 | ||||
-rw-r--r-- | swift/src/Ice/ValueFactoryManagerI.swift | 2 | ||||
-rw-r--r-- | swift/src/IceObjc/IceObjcLogger.h | 8 |
11 files changed, 97 insertions, 97 deletions
diff --git a/swift/src/Ice/CommunicatorI.swift b/swift/src/Ice/CommunicatorI.swift index bb06b80c7c8..77ac29668cc 100644 --- a/swift/src/Ice/CommunicatorI.swift +++ b/swift/src/Ice/CommunicatorI.swift @@ -54,7 +54,7 @@ class CommunicatorI: LocalObject<ICECommunicator>, Communicator { return _handle.isShutdown() } - func stringToProxy(str: String) throws -> ObjectPrx? { + func stringToProxy(_ str: String) throws -> ObjectPrx? { return try autoreleasepool { guard let prxHandle = try _handle.string(toProxy: str) as? ICEObjectPrx else { return nil @@ -63,11 +63,11 @@ class CommunicatorI: LocalObject<ICECommunicator>, Communicator { } } - func proxyToString(obj: ObjectPrx) throws -> String { + func proxyToString(_ obj: ObjectPrx) throws -> String { return try _handle.proxy(toString: obj.impl.handle) } - func propertyToProxy(property: String) throws -> ObjectPrx? { + func propertyToProxy(_ property: String) throws -> ObjectPrx? { return try autoreleasepool { guard let handle = try _handle.propertyToProxy(property: property) as? ICEObjectPrx else { return nil @@ -80,15 +80,15 @@ class CommunicatorI: LocalObject<ICECommunicator>, Communicator { return try _handle.proxy(toProperty: proxy.impl.handle, property: property) } - func stringToIdentity(str: String) throws -> Identity { + func stringToIdentity(_ str: String) throws -> Identity { return try Ice.stringToIdentity(string: str) } - func identityToString(ident: Identity) throws -> String { + func identityToString(_ ident: Identity) throws -> String { return try Ice.identityToString(identity: ident) } - func createObjectAdapter(name _: String) throws -> ObjectAdapter { + func createObjectAdapter(_ name: String) throws -> ObjectAdapter { preconditionFailure("TODO") // return try _handle.createObjectAdapter(name) } @@ -139,7 +139,7 @@ class CommunicatorI: LocalObject<ICECommunicator>, Communicator { return _RouterPrxI.fromICEObjectPrx(handle: handle, communicator: self) } - func setDefaultRouter(rtr: RouterPrx?) throws { + func setDefaultRouter(_ rtr: RouterPrx?) throws { try _handle.setDefaultRouter((rtr as? _RouterPrxI)?.handle) } @@ -150,7 +150,7 @@ class CommunicatorI: LocalObject<ICECommunicator>, Communicator { return _LocatorPrxI.fromICEObjectPrx(handle: handle, communicator: self) } - func setDefaultLocator(loc: LocatorPrx?) throws { + func setDefaultLocator(_ loc: LocatorPrx?) throws { try _handle.setDefaultRouter((loc as? _LocatorPrxI)?.handle) } @@ -158,7 +158,7 @@ class CommunicatorI: LocalObject<ICECommunicator>, Communicator { return valueFactoryManager } - func flushBatchRequests(compress: CompressBatch) throws { + func flushBatchRequests(_ compress: CompressBatch) throws { try _handle.flushBatchRequests(compress.rawValue) } @@ -177,12 +177,12 @@ class CommunicatorI: LocalObject<ICECommunicator>, Communicator { preconditionFailure("Not yet implemented") } - func removeAdminFacet(facet _: String) throws -> Object { + func removeAdminFacet(_ facet: String) throws -> Object { // TODO: preconditionFailure("Not yet implemented") } - func findAdminFacet(facet _: String) throws -> Object? { + func findAdminFacet(_ facet: String) throws -> Object? { // TODO: preconditionFailure("Not yet implemented") } diff --git a/swift/src/Ice/ConnectionI.swift b/swift/src/Ice/ConnectionI.swift index 4e98ca05e86..d47f92822aa 100644 --- a/swift/src/Ice/ConnectionI.swift +++ b/swift/src/Ice/ConnectionI.swift @@ -14,11 +14,11 @@ class ConnectionI: LocalObject<ICEConnection>, Connection { return toString() } - public func close(mode: ConnectionClose) { + public func close(_ mode: ConnectionClose) { _handle.close(mode.rawValue) } - public func createProxy(id: Identity) throws -> ObjectPrx? { + public func createProxy(_ id: Identity) throws -> ObjectPrx? { return try autoreleasepool { // // Returns Any which is either NSNull or ICEObjectPrx @@ -30,7 +30,7 @@ class ConnectionI: LocalObject<ICEConnection>, Connection { } } - public func setAdapter(adapter _: ObjectAdapter?) throws { + public func setAdapter(_ adapter: ObjectAdapter?) throws { return autoreleasepool { preconditionFailure("not implemented yet") } @@ -44,13 +44,13 @@ class ConnectionI: LocalObject<ICEConnection>, Connection { return EndpointI(handle: _handle.getEndpoint()) } - public func flushBatchRequests(compress: CompressBatch) throws { + public func flushBatchRequests(_ compress: CompressBatch) throws { return try autoreleasepool { try _handle.flushBatchRequests(compress.rawValue) } } - public func setCloseCallback(callback: CloseCallback?) throws { + public func setCloseCallback(_ callback: CloseCallback?) throws { return try autoreleasepool { guard let cb = callback else { try _handle.setCloseCallback(nil) @@ -64,7 +64,7 @@ class ConnectionI: LocalObject<ICEConnection>, Connection { } } - public func setHeartbeatCallback(callback: HeartbeatCallback?) throws { + public func setHeartbeatCallback(_ callback: HeartbeatCallback?) throws { return try autoreleasepool { guard let cb = callback else { try _handle.setHeartbeatCallback(nil) diff --git a/swift/src/Ice/Globals.swift b/swift/src/Ice/Globals.swift index ef94d4c78b1..eb3fda2d493 100644 --- a/swift/src/Ice/Globals.swift +++ b/swift/src/Ice/Globals.swift @@ -36,7 +36,7 @@ public func initialize(args: StringSeq = [], } if configFile != nil { - try initData.properties!.load(file: configFile!) + try initData.properties!.load(configFile!) } let propsHandle = (initData.properties as? PropertiesI)?._handle @@ -87,6 +87,6 @@ public func identityToString(identity: Identity, mode: ToStringMode = ToStringMo public let Encoding_1_0 = Protocol.Encoding_1_0 public let Encoding_1_1 = Protocol.Encoding_1_1 -public func encodingVersionToString(encoding: EncodingVersion) -> String { +public func encodingVersionToString(_ encoding: EncodingVersion) -> String { return ICEUtil.encodingVersionToString(major: encoding.major, minor: encoding.minor) } diff --git a/swift/src/Ice/ImplicitContextI.swift b/swift/src/Ice/ImplicitContextI.swift index 15c86284a91..c91f0d6c5bb 100644 --- a/swift/src/Ice/ImplicitContextI.swift +++ b/swift/src/Ice/ImplicitContextI.swift @@ -14,15 +14,15 @@ class ImplicitContextI: LocalObject<ICEImplicitContext>, ImplicitContext { return _handle.getContext() } - func setContext(newContext: Context) { + func setContext(_ newContext: Context) { _handle.setContext(newContext) } - func containsKey(key: String) -> Bool { + func containsKey(_ key: String) -> Bool { return _handle.containsKey(key) } - func get(key: String) -> String { + func get(_ key: String) -> String { return _handle.get(key) } @@ -30,7 +30,7 @@ class ImplicitContextI: LocalObject<ICEImplicitContext>, ImplicitContext { return _handle.put(key, value: value) } - func remove(key: String) -> String { + func remove(_ key: String) -> String { return _handle.remove(key) } } diff --git a/swift/src/Ice/InputStream.swift b/swift/src/Ice/InputStream.swift index d467dd59fd4..92f964cf479 100644 --- a/swift/src/Ice/InputStream.swift +++ b/swift/src/Ice/InputStream.swift @@ -888,7 +888,7 @@ extension EncapsDecoder { // // Try to find a factory registered for the specific type. // - if let factory = valueFactoryManager.find(id: typeId) { + if let factory = valueFactoryManager.find(typeId) { if let v = factory(typeId) { return v } @@ -898,7 +898,7 @@ extension EncapsDecoder { // If that fails, invoke the default factory if one has been // registered. // - if let factory = valueFactoryManager.find(id: "") { + if let factory = valueFactoryManager.find("") { if let v = factory(typeId) { return v } diff --git a/swift/src/Ice/LoggerI.swift b/swift/src/Ice/LoggerI.swift index 7f2edc9df29..bf122dadb2f 100644 --- a/swift/src/Ice/LoggerI.swift +++ b/swift/src/Ice/LoggerI.swift @@ -21,7 +21,7 @@ class LoggerI: Logger { self.prefix = prefix } - func print(message: String) { + func print(_ message: String) { os_log("%{public}s", log: log, type: .default, message) } @@ -30,11 +30,11 @@ class LoggerI: Logger { os_log("%{public}s", log: tLog, type: .info, message) } - func warning(message: String) { + func warning(_ message: String) { os_log("%{public}s", log: log, type: .error, message) } - func error(message: String) { + func error(_ message: String) { os_log("%{public}s", log: log, type: .fault, message) } @@ -42,7 +42,7 @@ class LoggerI: Logger { return prefix } - func cloneWithPrefix(prefix: String) -> Logger { + func cloneWithPrefix(_ prefix: String) -> Logger { return LoggerI(prefix: prefix) } } @@ -50,7 +50,7 @@ class LoggerI: Logger { // This extension adds an additional clone so that LoggerI cann be used with ObjC's ICELogger // without needing to use LoggerWrapper extension LoggerI: ICELoggerProtocol { - func cloneWithPrefix(prefix: String) -> Any { + func cloneWithPrefix(_ prefix: String) -> Any { return LoggerI(prefix: prefix) } } diff --git a/swift/src/Ice/LoggerWrapper.swift b/swift/src/Ice/LoggerWrapper.swift index 5fd7eb86848..8e5ae666bd9 100644 --- a/swift/src/Ice/LoggerWrapper.swift +++ b/swift/src/Ice/LoggerWrapper.swift @@ -17,55 +17,55 @@ class LoggerWrapper: ICELoggerProtocol { self.impl = impl } - func print(message: String) { - impl.print(message: message) + func print(_ message: String) { + impl.print(message) } func trace(category: String, message: String) { impl.trace(category: category, message: message) } - func warning(message: String) { - impl.warning(message: message) + func warning(_ message: String) { + impl.warning(message) } - func error(message: String) { - impl.error(message: message) + func error(_ message: String) { + impl.error(message) } func getPrefix() -> String { return impl.getPrefix() } - func cloneWithPrefix(prefix: String) -> Any { - return impl.cloneWithPrefix(prefix: prefix) + func cloneWithPrefix(_ prefix: String) -> Any { + return impl.cloneWithPrefix(prefix) } } // Wrapps Ice C++ logger class ObjcLoggerWrapper: LocalObject<ICELogger>, Logger { - func print(message: String) { - _handle.print(message: message) + func print(_ message: String) { + _handle.print(message) } func trace(category: String, message: String) { _handle.trace(category: category, message: message) } - func warning(message: String) { - _handle.warning(message: message) + func warning(_ message: String) { + _handle.warning(message) } - func error(message: String) { - _handle.error(message: message) + func error(_ message: String) { + _handle.error(message) } func getPrefix() -> String { return _handle.getPrefix() } - func cloneWithPrefix(prefix: String) -> Logger { + func cloneWithPrefix(_ prefix: String) -> Logger { // swiftlint:disable force_cast - return ObjcLoggerWrapper(handle: _handle.cloneWithPrefix(prefix: prefix) as! ICELogger) + return ObjcLoggerWrapper(handle: _handle.cloneWithPrefix(prefix) as! ICELogger) } } diff --git a/swift/src/Ice/PropertiesI.swift b/swift/src/Ice/PropertiesI.swift index dc966b78d1b..327aaa1c45f 100644 --- a/swift/src/Ice/PropertiesI.swift +++ b/swift/src/Ice/PropertiesI.swift @@ -10,7 +10,7 @@ import IceObjc class PropertiesI: LocalObject<ICEProperties>, Properties { - public func getProperty(key: String) -> String { + public func getProperty(_ key: String) -> String { return _handle.getProperty(key) } @@ -18,7 +18,7 @@ class PropertiesI: LocalObject<ICEProperties>, Properties { return _handle.getPropertyWithDefault(key, value: value) } - public func getPropertyAsInt(key: String) -> Int32 { + public func getPropertyAsInt(_ key: String) -> Int32 { return _handle.getPropertyAsInt(key) } @@ -26,7 +26,7 @@ class PropertiesI: LocalObject<ICEProperties>, Properties { return _handle.getPropertyAsInt(withDefault: key, value: value) } - public func getPropertyAsList(key: String) -> StringSeq { + public func getPropertyAsList(_ key: String) -> StringSeq { return _handle.getPropertyAsList(key) } @@ -34,7 +34,7 @@ class PropertiesI: LocalObject<ICEProperties>, Properties { return _handle.getPropertyAsList(withDefault: key, value: value) } - public func getPropertiesForPrefix(prefix: String) -> PropertyDict { + public func getPropertiesForPrefix(_ prefix: String) -> PropertyDict { return _handle.getPropertiesForPrefix(prefix) } @@ -54,13 +54,13 @@ class PropertiesI: LocalObject<ICEProperties>, Properties { } } - public func parseIceCommandLineOptions(options: StringSeq) throws -> StringSeq { + public func parseIceCommandLineOptions(_ options: StringSeq) throws -> StringSeq { return try autoreleasepool { try _handle.parseIceCommandLineOptions(options) } } - public func load(file: String) throws { + public func load(_ file: String) throws { return try autoreleasepool { try _handle.load(file) } diff --git a/swift/src/Ice/Proxy.swift b/swift/src/Ice/Proxy.swift index 70179c0a383..26072bf1547 100644 --- a/swift/src/Ice/Proxy.swift +++ b/swift/src/Ice/Proxy.swift @@ -13,35 +13,35 @@ import PromiseKit public protocol ObjectPrx: CustomStringConvertible, AnyObject { func ice_getCommunicator() -> Communicator func ice_getIdentity() -> Identity - func ice_identity(id: Identity) throws -> Self + func ice_identity(_ id: Identity) throws -> Self func ice_getContext() -> Context - func ice_context(context: Context) -> Self + func ice_context(_ context: Context) -> Self func ice_getFacet() -> String - func ice_facet(facet: String) -> ObjectPrx + func ice_facet(_ facet: String) -> ObjectPrx func ice_getAdapterId() -> String - func ice_adapterId(id: String) throws -> Self + func ice_adapterId(_ id: String) throws -> Self func ice_getEndpoints() -> [Endpoint] - func ice_endpoints(endpoints: [Endpoint]) throws -> Self + func ice_endpoints(_ endpoints: [Endpoint]) throws -> Self func ice_getLocatorCacheTimeout() -> Int32 - func ice_locatorCacheTimeout(timeout: Int32) throws -> Self + func ice_locatorCacheTimeout(_ timeout: Int32) throws -> Self func ice_getInvocationTimeout() -> Int32 - func ice_invocationTimeout(timeout: Int32) throws -> Self + func ice_invocationTimeout(_ timeout: Int32) throws -> Self func ice_getConnectionId() -> String - func ice_connectionId(id: String) throws -> Self + func ice_connectionId(_ id: String) throws -> Self func ice_isConnectionCached() -> Bool - func ice_connectionCached(cached: Bool) throws -> Self + func ice_connectionCached(_ cached: Bool) throws -> Self func ice_getEndpointSelection() -> EndpointSelectionType - func ice_endpointSelection(type: EndpointSelectionType) throws -> Self + func ice_endpointSelection(_ type: EndpointSelectionType) throws -> Self func ice_getEncodingVersion() -> EncodingVersion - func ice_encodingVersion(encoding: EncodingVersion) -> Self + func ice_encodingVersion(_ encoding: EncodingVersion) -> Self func ice_getRouter() -> RouterPrx? - func ice_router(router: RouterPrx?) throws -> Self + func ice_router(_ router: RouterPrx?) throws -> Self func ice_getLocator() -> LocatorPrx? - func ice_locator(locator: LocatorPrx?) throws -> Self + func ice_locator(_ locator: LocatorPrx?) throws -> Self func ice_isSecure() -> Bool - func ice_secure(secure: Bool) -> Self + func ice_secure(_ secure: Bool) -> Self func ice_isPreferSecure() -> Bool - func ice_preferSecure(preferSecure: Bool) throws -> Self + func ice_preferSecure(_ preferSecure: Bool) throws -> Self func ice_isTwoway() -> Bool func ice_twoway() -> Self func ice_isOneway() -> Bool @@ -53,16 +53,16 @@ public protocol ObjectPrx: CustomStringConvertible, AnyObject { func ice_isBatchDatagram() -> Bool func ice_batchDatagram() -> Self func ice_getCompress() -> Bool? - func ice_compress(compress: Bool) -> Self + func ice_compress(_ compress: Bool) -> Self func ice_getTimeout() -> Int32? - func ice_timeout(timeout: Int32) throws -> Self - func ice_fixed(connection: Connection) throws -> ObjectPrx? + func ice_timeout(_ timeout: Int32) throws -> Self + func ice_fixed(_ connection: Connection) throws -> ObjectPrx? func ice_getConnection() throws -> Connection? func ice_getCachedConnection() -> Connection? func ice_flushBatchRequests() throws func ice_toString() -> String func ice_isCollocationOptimized() -> Bool - func ice_collocationOptimized(collocated: Bool) throws -> ObjectPrx? + func ice_collocationOptimized(_ collocated: Bool) throws -> ObjectPrx? func ice_invoke(operation: String, mode: OperationMode, @@ -275,7 +275,7 @@ open class _ObjectPrxI: ObjectPrx { return Identity(name: name as String, category: category as String) } - public func ice_identity(id: Identity) throws -> Self { + public func ice_identity(_ id: Identity) throws -> Self { return try autoreleasepool { try fromICEObjectPrx(handle.ice_identity(id.name, category: id.category)) } @@ -285,7 +285,7 @@ open class _ObjectPrxI: ObjectPrx { return handle.ice_getContext() as Context } - public func ice_context(context: Context) -> Self { + public func ice_context(_ context: Context) -> Self { return fromICEObjectPrx(handle.ice_context(context)) } @@ -293,7 +293,7 @@ open class _ObjectPrxI: ObjectPrx { return handle.ice_getFacet() } - public func ice_facet(facet: String) -> ObjectPrx { + public func ice_facet(_ facet: String) -> ObjectPrx { return fromICEObjectPrx(handle.ice_facet(facet)) } @@ -301,7 +301,7 @@ open class _ObjectPrxI: ObjectPrx { return handle.ice_getAdapterId() } - public func ice_adapterId(id: String) throws -> Self { + public func ice_adapterId(_ id: String) throws -> Self { return try autoreleasepool { try fromICEObjectPrx(handle.ice_adapterId(id)) } @@ -313,7 +313,7 @@ open class _ObjectPrxI: ObjectPrx { } } - public func ice_endpoints(endpoints: [Endpoint]) throws -> Self { + public func ice_endpoints(_ endpoints: [Endpoint]) throws -> Self { return try autoreleasepool { try fromICEObjectPrx(handle.ice_endpoints(endpoints.map { ($0 as! EndpointI)._handle })) } @@ -323,7 +323,7 @@ open class _ObjectPrxI: ObjectPrx { return handle.ice_getLocatorCacheTimeout() } - public func ice_locatorCacheTimeout(timeout: Int32) throws -> Self { + public func ice_locatorCacheTimeout(_ timeout: Int32) throws -> Self { return try autoreleasepool { try fromICEObjectPrx(handle.ice_locatorCacheTimeout(timeout)) } @@ -333,7 +333,7 @@ open class _ObjectPrxI: ObjectPrx { return handle.ice_getInvocationTimeout() } - public func ice_invocationTimeout(timeout: Int32) throws -> Self { + public func ice_invocationTimeout(_ timeout: Int32) throws -> Self { return try autoreleasepool { try fromICEObjectPrx(handle.ice_invocationTimeout(timeout)) } @@ -343,7 +343,7 @@ open class _ObjectPrxI: ObjectPrx { return handle.ice_getConnectionId() } - public func ice_connectionId(id: String) throws -> Self { + public func ice_connectionId(_ id: String) throws -> Self { return try autoreleasepool { try fromICEObjectPrx(handle.ice_connectionId(id)) } @@ -353,7 +353,7 @@ open class _ObjectPrxI: ObjectPrx { return handle.ice_isConnectionCached() } - public func ice_connectionCached(cached: Bool) throws -> Self { + public func ice_connectionCached(_ cached: Bool) throws -> Self { return try autoreleasepool { try fromICEObjectPrx(handle.ice_connectionCached(cached)) } @@ -363,7 +363,7 @@ open class _ObjectPrxI: ObjectPrx { return EndpointSelectionType(rawValue: handle.ice_getEndpointSelection())! } - public func ice_endpointSelection(type: EndpointSelectionType) throws -> Self { + public func ice_endpointSelection(_ type: EndpointSelectionType) throws -> Self { return try autoreleasepool { try fromICEObjectPrx(handle.ice_endpointSelection(type.rawValue)) } @@ -373,7 +373,7 @@ open class _ObjectPrxI: ObjectPrx { return encoding } - public func ice_encodingVersion(encoding: EncodingVersion) -> Self { + public func ice_encodingVersion(_ encoding: EncodingVersion) -> Self { return fromICEObjectPrx(handle.ice_encodingVersion(encoding.major, minor: encoding.minor)) } @@ -384,7 +384,7 @@ open class _ObjectPrxI: ObjectPrx { return fromICEObjectPrx(routerHandle) as _RouterPrxI } - public func ice_router(router: RouterPrx?) throws -> Self { + public func ice_router(_ router: RouterPrx?) throws -> Self { return try autoreleasepool { let r = router as? _RouterPrxI return try fromICEObjectPrx(handle.ice_router(r?.handle ?? nil)) @@ -398,7 +398,7 @@ open class _ObjectPrxI: ObjectPrx { return fromICEObjectPrx(locatorHandle) as _LocatorPrxI } - public func ice_locator(locator: LocatorPrx?) throws -> Self { + public func ice_locator(_ locator: LocatorPrx?) throws -> Self { return try autoreleasepool { let l = locator as? _LocatorPrxI return try fromICEObjectPrx(handle.ice_locator(l?.handle ?? nil)) @@ -409,7 +409,7 @@ open class _ObjectPrxI: ObjectPrx { return handle.ice_isSecure() } - public func ice_secure(secure: Bool) -> Self { + public func ice_secure(_ secure: Bool) -> Self { return fromICEObjectPrx(handle.ice_secure(secure)) } @@ -417,7 +417,7 @@ open class _ObjectPrxI: ObjectPrx { return handle.ice_isPreferSecure() } - public func ice_preferSecure(preferSecure: Bool) throws -> Self { + public func ice_preferSecure(_ preferSecure: Bool) throws -> Self { return try autoreleasepool { try fromICEObjectPrx(handle.ice_preferSecure(preferSecure)) } @@ -470,7 +470,7 @@ open class _ObjectPrxI: ObjectPrx { return compress } - public func ice_compress(compress: Bool) -> Self { + public func ice_compress(_ compress: Bool) -> Self { return fromICEObjectPrx(handle.ice_compress(compress)) } @@ -481,11 +481,11 @@ open class _ObjectPrxI: ObjectPrx { return timeout } - public func ice_timeout(timeout: Int32) throws -> Self { + public func ice_timeout(_ timeout: Int32) throws -> Self { return try fromICEObjectPrx(handle.ice_timeout(timeout)) } - public func ice_fixed(connection: Connection) throws -> ObjectPrx? { + public func ice_fixed(_ connection: Connection) throws -> ObjectPrx? { return try autoreleasepool { try fromICEObjectPrx(handle.ice_fixed((connection as! ConnectionI)._handle)) as _ObjectPrxI } @@ -528,7 +528,7 @@ open class _ObjectPrxI: ObjectPrx { return handle.ice_isCollocationOptimized() } - public func ice_collocationOptimized(collocated: Bool) throws -> ObjectPrx? { + public func ice_collocationOptimized(_ collocated: Bool) throws -> ObjectPrx? { return try fromICEObjectPrx(handle.ice_collocationOptimized(collocated)) } @@ -704,7 +704,7 @@ open class _ObjectPrxI: ObjectPrx { facet: String? = nil, context: Context? = nil) throws -> ProxyImpl? where ProxyImpl: _ObjectPrxI { - let objPrx = facet != nil ? prx.ice_facet(facet: facet!) : prx + let objPrx = facet != nil ? prx.ice_facet(facet!) : prx guard try objPrx.ice_isA(id: ProxyImpl.ice_staticId(), context: context) else { return nil } @@ -714,7 +714,7 @@ open class _ObjectPrxI: ObjectPrx { public static func uncheckedCast<ProxyImpl>(prx: ObjectPrx, facet: String? = nil, context _: Context? = nil) -> ProxyImpl where ProxyImpl: _ObjectPrxI { - let objPrx = facet != nil ? prx.ice_facet(facet: facet!) : prx + let objPrx = facet != nil ? prx.ice_facet(facet!) : prx return ProxyImpl(from: objPrx) } } diff --git a/swift/src/Ice/ValueFactoryManagerI.swift b/swift/src/Ice/ValueFactoryManagerI.swift index 10424143ec8..eb6b5caf2a2 100644 --- a/swift/src/Ice/ValueFactoryManagerI.swift +++ b/swift/src/Ice/ValueFactoryManagerI.swift @@ -21,7 +21,7 @@ class ValueFactoryManagerI: ValueFactoryManager { } } - func find(id: String) -> ValueFactory? { + func find(_ id: String) -> ValueFactory? { return mutex.sync { factories[id] } diff --git a/swift/src/IceObjc/IceObjcLogger.h b/swift/src/IceObjc/IceObjcLogger.h index c27f5385d97..a153cbcdc59 100644 --- a/swift/src/IceObjc/IceObjcLogger.h +++ b/swift/src/IceObjc/IceObjcLogger.h @@ -12,12 +12,12 @@ NS_ASSUME_NONNULL_BEGIN @protocol ICELoggerProtocol --(void) print:(NSString*)message NS_SWIFT_NAME(print(message:)); +-(void) print:(NSString*)message NS_SWIFT_NAME(print(_:)); -(void) trace:(NSString*)category message:(NSString*)message NS_SWIFT_NAME(trace(category:message:)); --(void) warning:(NSString*)message NS_SWIFT_NAME(warning(message:)); --(void) error:(NSString*)message NS_SWIFT_NAME(error(message:)); +-(void) warning:(NSString*)message NS_SWIFT_NAME(warning(_:)); +-(void) error:(NSString*)message NS_SWIFT_NAME(error(_:)); -(NSString*) getPrefix; --(id) cloneWithPrefix:(NSString*)prefix NS_SWIFT_NAME(cloneWithPrefix(prefix:)); +-(id) cloneWithPrefix:(NSString*)prefix NS_SWIFT_NAME(cloneWithPrefix(_:)); @end @interface ICELogger: ICELocalObject<ICELoggerProtocol> |