Skip to content

Commit

Permalink
Merge pull request #32 from pinterest/data_copy
Browse files Browse the repository at this point in the history
use [data copy] to be extra safe
  • Loading branch information
woshimaliang committed Mar 11, 2024
2 parents 689ec2e + 531b653 commit 285084c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface PINNSURLSessionDataTaskResult : NSObject

@property (nonatomic, readonly) NSData * _Nullable data;
@property (nonatomic, readonly) NSURLResponse * _Nullable response;
@property (nonatomic, copy, readonly) NSURLResponse * _Nullable response;
@property (nonatomic, readonly) NSError * _Nullable error;

+ (instancetype)resultWithData:(NSData * _Nullable)data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
NS_ASSUME_NONNULL_BEGIN

@interface PINNSURLSessionDataTaskResult ()
@property (nonatomic) NSData * _Nullable data;
@property (nonatomic, copy) NSData * _Nullable data; //intentionally use copy as the network data might be NSMutableData under the hood
@property (nonatomic) NSURLResponse * _Nullable response;
@property (nonatomic) NSError * _Nullable error;
@end
Expand Down

0 comments on commit 285084c

Please sign in to comment.