From 00ff5805a3c00e9d29cb71dfd5365c36dd5bf96c Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Mon, 19 Nov 2018 09:43:24 -0800 Subject: [PATCH] null_unspecified -> nullable --- src/objective-c/GRPCClient/GRPCCall.h | 26 +++++++++++++------------- src/objective-c/ProtoRPC/ProtoRPC.h | 10 +++++----- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/objective-c/GRPCClient/GRPCCall.h b/src/objective-c/GRPCClient/GRPCCall.h index 4c8c11eded2..214969af230 100644 --- a/src/objective-c/GRPCClient/GRPCCall.h +++ b/src/objective-c/GRPCClient/GRPCCall.h @@ -306,7 +306,7 @@ NS_ASSUME_NONNULL_END * * The property is initialized to an empty NSMutableDictionary. */ -@property(null_unspecified, atomic, readonly) NSMutableDictionary *requestHeaders; +@property(nullable, atomic, readonly) NSMutableDictionary *requestHeaders; /** * This dictionary is populated with the HTTP headers received from the server. This happens before @@ -317,7 +317,7 @@ NS_ASSUME_NONNULL_END * The value of this property is nil until all response headers are received, and will change before * any of -writeValue: or -writesFinishedWithError: are sent to the writeable. */ -@property(null_unspecified, atomic, readonly) NSDictionary *responseHeaders; +@property(nullable, atomic, readonly) NSDictionary *responseHeaders; /** * Same as responseHeaders, but populated with the HTTP trailers received from the server before the @@ -326,7 +326,7 @@ NS_ASSUME_NONNULL_END * The value of this property is nil until all response trailers are received, and will change * before -writesFinishedWithError: is sent to the writeable. */ -@property(null_unspecified, atomic, readonly) NSDictionary *responseTrailers; +@property(nullable, atomic, readonly) NSDictionary *responseTrailers; /** * The request writer has to write NSData objects into the provided Writeable. The server will @@ -339,9 +339,9 @@ NS_ASSUME_NONNULL_END * host parameter should not contain the scheme (http:// or https://), only the name or IP addr * and the port number, for example @"localhost:5050". */ -- (null_unspecified instancetype)initWithHost:(null_unspecified NSString *)host - path:(null_unspecified NSString *)path - requestsWriter:(null_unspecified GRXWriter *)requestWriter; +- (nullable instancetype)initWithHost:(nullable NSString *)host + path:(nullable NSString *)path + requestsWriter:(nullable GRXWriter *)requestWriter; /** * Finishes the request side of this call, notifies the server that the RPC should be cancelled, and @@ -353,11 +353,11 @@ NS_ASSUME_NONNULL_END * The following methods are deprecated. */ + (void)setCallSafety:(GRPCCallSafety)callSafety - host:(null_unspecified NSString *)host - path:(null_unspecified NSString *)path; -@property(null_unspecified, atomic, copy, readwrite) NSString *serverName; + host:(nullable NSString *)host + path:(nullable NSString *)path; +@property(nullable, atomic, copy, readwrite) NSString *serverName; @property NSTimeInterval timeout; -- (void)setResponseDispatchQueue:(null_unspecified dispatch_queue_t)queue; +- (void)setResponseDispatchQueue:(nullable dispatch_queue_t)queue; @end @@ -368,11 +368,11 @@ DEPRECATED_MSG_ATTRIBUTE("Use NSDictionary or NSMutableDictionary instead.") @protocol GRPCRequestHeaders @property(nonatomic, readonly) NSUInteger count; -- (null_unspecified id)objectForKeyedSubscript:(null_unspecified id)key; -- (void)setObject:(null_unspecified id)obj forKeyedSubscript:(null_unspecified id)key; +- (nullable id)objectForKeyedSubscript:(nullable id)key; +- (void)setObject:(nullable id)obj forKeyedSubscript:(nullable id)key; - (void)removeAllObjects; -- (void)removeObjectForKey:(null_unspecified id)key; +- (void)removeObjectForKey:(nullable id)key; @end #pragma clang diagnostic push diff --git a/src/objective-c/ProtoRPC/ProtoRPC.h b/src/objective-c/ProtoRPC/ProtoRPC.h index 98b60c3f727..2623aecb82f 100644 --- a/src/objective-c/ProtoRPC/ProtoRPC.h +++ b/src/objective-c/ProtoRPC/ProtoRPC.h @@ -132,11 +132,11 @@ __attribute__((deprecated("Please use GRPCProtoCall."))) @interface ProtoRPC * addr and the port number, for example @"localhost:5050". */ - - (instancetype _Null_unspecified)initWithHost : (NSString *_Null_unspecified)host method - : (GRPCProtoMethod *_Null_unspecified)method requestsWriter - : (GRXWriter *_Null_unspecified)requestsWriter responseClass - : (Class _Null_unspecified)responseClass responsesWriteable - : (id _Null_unspecified)responsesWriteable NS_DESIGNATED_INITIALIZER; + (nullable instancetype)initWithHost : (nullable NSString *)host method + : (nullable GRPCProtoMethod *)method requestsWriter + : (nullable GRXWriter *)requestsWriter responseClass + : (nullable Class)responseClass responsesWriteable + : (nullable id)responsesWriteable NS_DESIGNATED_INITIALIZER; - (void)start; @end