Skip to content

Commit 0a5f6f4

Browse files
author
Ben Chatelain
committed
GTDiffPatch nullability
1 parent dcfec55 commit 0a5f6f4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ObjectiveGit/GTDiffPatch.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
@class GTDiffHunk;
1313
@class GTDiffDelta;
1414

15+
NS_ASSUME_NONNULL_BEGIN
16+
1517
/// Represents one or more text changes to a single file within a diff.
1618
@interface GTDiffPatch : NSObject
1719

@@ -36,7 +38,7 @@
3638
/// automatically be freed when the receiver is deallocated. Must not be
3739
/// NULL.
3840
/// delta - The diff delta corresponding to this patch. Must not be nil.
39-
- (instancetype)initWithGitPatch:(git_patch *)patch delta:(GTDiffDelta *)delta NS_DESIGNATED_INITIALIZER;
41+
- (nullable instancetype)initWithGitPatch:(git_patch *)patch delta:(GTDiffDelta *)delta NS_DESIGNATED_INITIALIZER;
4042

4143
/// Returns the underlying patch object.
4244
- (git_patch *)git_patch __attribute__((objc_returns_inner_pointer));
@@ -59,10 +61,12 @@
5961
/// generating hunk content.
6062
///
6163
/// block - A block to be executed for each hunk. Setting `stop` to `YES`
62-
/// will stop the enumeration after the block returns.
64+
/// will stop the enumeration after the block returns. May not be nil.
6365
///
6466
/// Returns whether enumeration was successful, or terminated early. If `NO`, an
6567
/// error occurred during enumeration.
6668
- (BOOL)enumerateHunksUsingBlock:(void (^)(GTDiffHunk *hunk, BOOL *stop))block;
6769

6870
@end
71+
72+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)