From 0edd7610d397aae70a4650069ab7b8df264b814a Mon Sep 17 00:00:00 2001 From: Wil Shipley Date: Thu, 6 Aug 2015 17:55:17 -0700 Subject: [PATCH 1/3] =?UTF-8?q?-=20Add=20the=20"DwelliingDataModel"=20back?= =?UTF-8?q?=20as=20an=20embedded=20framework=E2=80=94lost=20it=20last=20ni?= =?UTF-8?q?ght=20when=20I=20changed=20its=20path.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From 1953ebe40acf115f7b06ed6228c4a8f8c0857f6f Mon Sep 17 00:00:00 2001 From: Wil Shipley Date: Thu, 6 Aug 2015 17:56:38 -0700 Subject: [PATCH 2/3] - Added nullability specifiers to shut the latest Xcode 7 compiler up. - Had to use "_Null_unspecified" on some because it wasn't clear what to use. --- ObjectiveGit/GTConfiguration+Private.h | 2 +- ObjectiveGit/GTDiff+Private.h | 2 +- ObjectiveGit/GTFilter.h | 4 ++-- ObjectiveGit/GTReflog+Private.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ObjectiveGit/GTConfiguration+Private.h b/ObjectiveGit/GTConfiguration+Private.h index b33b1e700..efd0598ec 100644 --- a/ObjectiveGit/GTConfiguration+Private.h +++ b/ObjectiveGit/GTConfiguration+Private.h @@ -18,6 +18,6 @@ /// repository - The repository in which the config resides. May be nil. /// /// Returns the initialized object. -- (nullable instancetype)initWithGitConfig:(git_config *)config repository:(nullable GTRepository *)repository NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithGitConfig:(nonnull git_config *)config repository:(nullable GTRepository *)repository NS_DESIGNATED_INITIALIZER; @end diff --git a/ObjectiveGit/GTDiff+Private.h b/ObjectiveGit/GTDiff+Private.h index 38ecb2a1d..4a4bbd9ea 100644 --- a/ObjectiveGit/GTDiff+Private.h +++ b/ObjectiveGit/GTDiff+Private.h @@ -14,6 +14,6 @@ /// provides a pointer to that structure to the given `block`. /// /// Returns the result of invoking `block`. -+ (int)handleParsedOptionsDictionary:(nullable NSDictionary *)dictionary usingBlock:(int (^)(git_diff_options *optionsStruct))block; ++ (int)handleParsedOptionsDictionary:(nullable NSDictionary *)dictionary usingBlock:(nonnull int (^)(git_diff_options * _Null_unspecified optionsStruct))block; @end diff --git a/ObjectiveGit/GTFilter.h b/ObjectiveGit/GTFilter.h index 33fea06f0..bfd268918 100644 --- a/ObjectiveGit/GTFilter.h +++ b/ObjectiveGit/GTFilter.h @@ -34,7 +34,7 @@ extern const NSInteger GTFilterErrorNameAlreadyRegistered; /// The check block. Determines whether the `applyBlock` should be run for given /// source. -@property (nonatomic, copy) BOOL (^checkBlock)(void **payload, GTFilterSource *source, const char **attr_values); +@property (nonatomic, copy) BOOL (^checkBlock)(void * _Null_unspecified * _Null_unspecified payload, GTFilterSource *source, const char * _Null_unspecified * _Null_unspecified attr_values); /// The cleanup block. Called after the `applyBlock` to given the filter a /// chance to clean up the `payload`. @@ -49,7 +49,7 @@ extern const NSInteger GTFilterErrorNameAlreadyRegistered; /// applyBlock - The block to use to apply the filter. Cannot be nil. /// /// Returns the initialized object. -- (nullable instancetype)initWithName:(NSString *)name attributes:(nullable NSString *)attributes applyBlock:(NSData * (^)(void **payload, NSData *from, GTFilterSource *source, BOOL *applied))applyBlock NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithName:(NSString *)name attributes:(nullable NSString *)attributes applyBlock:(NSData * (^)(void *_Null_unspecified * _Null_unspecified payload, NSData *from, GTFilterSource *source, BOOL *applied))applyBlock NS_DESIGNATED_INITIALIZER; /// Look up a filter based on its name. /// diff --git a/ObjectiveGit/GTReflog+Private.h b/ObjectiveGit/GTReflog+Private.h index 9fc78e8b8..19fc16b9f 100644 --- a/ObjectiveGit/GTReflog+Private.h +++ b/ObjectiveGit/GTReflog+Private.h @@ -12,13 +12,13 @@ @interface GTReflog () -- (instancetype)init NS_UNAVAILABLE; +- (nullable instancetype)init NS_UNAVAILABLE; /// Initializes the receiver with a reference. Designated initializer. /// /// reference - The reference whose reflog is being represented. Cannot be nil. /// /// Returns the initialized object. -- (nullable instancetype)initWithReference:(GTReference *)reference NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithReference:(nonnull GTReference *)reference NS_DESIGNATED_INITIALIZER; @end From 8d9f2b53d7e462f1e13a3c8eb0f9fbd9d147e856 Mon Sep 17 00:00:00 2001 From: Wil Shipley Date: Thu, 6 Aug 2015 19:08:12 -0700 Subject: [PATCH 3/3] - Changed new "_Null_unspecified" to older "__null_unspecified" so it works in Xcode 6 as well as 7. --- ObjectiveGit/GTDiff+Private.h | 2 +- ObjectiveGit/GTFilter.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ObjectiveGit/GTDiff+Private.h b/ObjectiveGit/GTDiff+Private.h index 4a4bbd9ea..03b7f9146 100644 --- a/ObjectiveGit/GTDiff+Private.h +++ b/ObjectiveGit/GTDiff+Private.h @@ -14,6 +14,6 @@ /// provides a pointer to that structure to the given `block`. /// /// Returns the result of invoking `block`. -+ (int)handleParsedOptionsDictionary:(nullable NSDictionary *)dictionary usingBlock:(nonnull int (^)(git_diff_options * _Null_unspecified optionsStruct))block; ++ (int)handleParsedOptionsDictionary:(nullable NSDictionary *)dictionary usingBlock:(nonnull int (^)(git_diff_options * __null_unspecified optionsStruct))block; @end diff --git a/ObjectiveGit/GTFilter.h b/ObjectiveGit/GTFilter.h index bfd268918..8f70cc5e3 100644 --- a/ObjectiveGit/GTFilter.h +++ b/ObjectiveGit/GTFilter.h @@ -34,7 +34,7 @@ extern const NSInteger GTFilterErrorNameAlreadyRegistered; /// The check block. Determines whether the `applyBlock` should be run for given /// source. -@property (nonatomic, copy) BOOL (^checkBlock)(void * _Null_unspecified * _Null_unspecified payload, GTFilterSource *source, const char * _Null_unspecified * _Null_unspecified attr_values); +@property (nonatomic, copy) BOOL (^checkBlock)(void * __null_unspecified * __null_unspecified payload, GTFilterSource *source, const char * __null_unspecified * __null_unspecified attr_values); /// The cleanup block. Called after the `applyBlock` to given the filter a /// chance to clean up the `payload`. @@ -49,7 +49,7 @@ extern const NSInteger GTFilterErrorNameAlreadyRegistered; /// applyBlock - The block to use to apply the filter. Cannot be nil. /// /// Returns the initialized object. -- (nullable instancetype)initWithName:(NSString *)name attributes:(nullable NSString *)attributes applyBlock:(NSData * (^)(void *_Null_unspecified * _Null_unspecified payload, NSData *from, GTFilterSource *source, BOOL *applied))applyBlock NS_DESIGNATED_INITIALIZER; +- (nullable instancetype)initWithName:(NSString *)name attributes:(nullable NSString *)attributes applyBlock:(NSData * (^)(void *__null_unspecified * __null_unspecified payload, NSData *from, GTFilterSource *source, BOOL *applied))applyBlock NS_DESIGNATED_INITIALIZER; /// Look up a filter based on its name. ///