Skip to content

Commit f12976f

Browse files
committed
Merge pull request #733 from ParsePlatform/nlutsenko.nullability
Update nullability specifier syntax to latest.
2 parents b12efd1 + 2a2a488 commit f12976f

File tree

12 files changed

+35
-35
lines changed

12 files changed

+35
-35
lines changed

Parse/Internal/Commands/CommandRunner/URLSession/Session/TaskDelegate/PFURLSessionUploadTaskDelegate.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#import "PFURLSessionUploadTaskDelegate.h"
1111

1212
@implementation PFURLSessionUploadTaskDelegate {
13-
__nullable PFProgressBlock _progressBlock;
13+
_Nullable PFProgressBlock _progressBlock;
1414
}
1515

1616
///--------------------------------------

Parse/Internal/LocalDataStore/OfflineStore/PFOfflineStore.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ - (instancetype)initWithFileManager:(PFFileManager *)fileManager options:(PFOffl
176176
uuid = task.result;
177177
NSString *query = [NSString stringWithFormat:@"SELECT %@ FROM %@ WHERE %@ = ?;",
178178
PFOfflineStoreKeyOfJSON, PFOfflineStoreTableOfObjects, PFOfflineStoreKeyOfUUID];
179-
return [database executeQueryAsync:query withArgumentsInArray:@[ uuid ] block:^id(PFSQLiteDatabaseResult *__nonnull result) {
179+
return [database executeQueryAsync:query withArgumentsInArray:@[ uuid ] block:^id(PFSQLiteDatabaseResult *_Nonnull result) {
180180
if (![result next]) {
181181
[NSException raise:NSInternalInconsistencyException
182182
format:@"Attempted to find non-existent uuid %@.", uuid];
@@ -213,7 +213,7 @@ - (instancetype)initWithFileManager:(PFFileManager *)fileManager options:(PFOffl
213213

214214
__block NSString *jsonString = nil;
215215
__block NSString *newUUID = nil;
216-
jsonStringTask = [[database executeQueryAsync:query withArgumentsInArray:@[ className, objectId ] block:^id(PFSQLiteDatabaseResult *__nonnull result) {
216+
jsonStringTask = [[database executeQueryAsync:query withArgumentsInArray:@[ className, objectId ] block:^id(PFSQLiteDatabaseResult *_Nonnull result) {
217217
if (![result next]) {
218218
NSString *errorMessage = @"This object is not available in the offline cache.";
219219
NSError *error = [PFErrorUtilities errorWithCode:kPFErrorCacheMiss

Parse/Internal/LocalDataStore/SQLite/PFSQLiteDatabase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@class PFFileManager;
1818
@class PFSQLiteDatabaseResult;
1919

20-
typedef id __nullable(^PFSQLiteDatabaseQueryBlock)(PFSQLiteDatabaseResult *__nonnull result);
20+
typedef id _Nullable(^PFSQLiteDatabaseQueryBlock)(PFSQLiteDatabaseResult *_Nonnull result);
2121

2222
/**
2323
Argument count given in executeSQLAsync or executeQueryAsync is invalid.

Parse/Internal/Persistence/PFPersistenceController.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
2121
#pragma mark - Controller
2222
///--------------------------------------
2323

24-
typedef BFTask<NSNumber *> *__nonnull (^PFPersistenceGroupValidationHandler)(id<PFPersistenceGroup> group);
24+
typedef BFTask<NSNumber *> *_Nonnull (^PFPersistenceGroupValidationHandler)(id<PFPersistenceGroup> group);
2525

2626
@interface PFPersistenceController : NSObject
2727

Parse/PFConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
1717

1818
@class PFConfig;
1919

20-
typedef void(^PFConfigResultBlock)(PFConfig *__nullable config, NSError *__nullable error);
20+
typedef void(^PFConfigResultBlock)(PFConfig *_Nullable config, NSError *_Nullable error);
2121

2222
/**
2323
`PFConfig` is a representation of the remote configuration object.

Parse/PFConstants.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extern NSInteger const PARSE_API_VERSION;
2727
#define PARSE_IOS_ONLY (TARGET_OS_IPHONE)
2828
#define PARSE_OSX_ONLY (TARGET_OS_MAC && !(TARGET_OS_IPHONE))
2929

30-
extern NSString *const __nonnull kPFDeviceType;
30+
extern NSString *const _Nonnull kPFDeviceType;
3131

3232
///--------------------------------------
3333
#pragma mark - Cache Policies
@@ -123,7 +123,7 @@ typedef NS_ENUM(uint8_t, PFLogLevel) {
123123
#pragma mark - Errors
124124
///--------------------------------------
125125

126-
extern NSString *const __nonnull PFParseErrorDomain;
126+
extern NSString *const _Nonnull PFParseErrorDomain;
127127

128128
/**
129129
`PFErrorCode` enum contains all custom error codes that are used as `code` for `NSError` for callbacks on all classes.
@@ -359,17 +359,17 @@ typedef NS_ENUM(NSInteger, PFErrorCode) {
359359
#pragma mark - Blocks
360360
///--------------------------------------
361361

362-
typedef void (^PFBooleanResultBlock)(BOOL succeeded, NSError *__nullable error);
363-
typedef void (^PFIntegerResultBlock)(int number, NSError *__nullable error);
364-
typedef void (^PFArrayResultBlock)(NSArray *__nullable objects, NSError *__nullable error);
365-
typedef void (^PFObjectResultBlock)(PFObject *__nullable object, NSError *__nullable error);
366-
typedef void (^PFSetResultBlock)(NSSet *__nullable channels, NSError *__nullable error);
367-
typedef void (^PFUserResultBlock)(PFUser *__nullable user, NSError *__nullable error);
368-
typedef void (^PFDataResultBlock)(NSData *__nullable data, NSError *__nullable error);
369-
typedef void (^PFDataStreamResultBlock)(NSInputStream *__nullable stream, NSError *__nullable error);
370-
typedef void (^PFFilePathResultBlock)(NSString *__nullable filePath, NSError *__nullable error);
371-
typedef void (^PFStringResultBlock)(NSString *__nullable string, NSError *__nullable error);
372-
typedef void (^PFIdResultBlock)(__nullable id object, NSError *__nullable error);
362+
typedef void (^PFBooleanResultBlock)(BOOL succeeded, NSError *_Nullable error);
363+
typedef void (^PFIntegerResultBlock)(int number, NSError *_Nullable error);
364+
typedef void (^PFArrayResultBlock)(NSArray *_Nullable objects, NSError *_Nullable error);
365+
typedef void (^PFObjectResultBlock)(PFObject *_Nullable object, NSError *_Nullable error);
366+
typedef void (^PFSetResultBlock)(NSSet *_Nullable channels, NSError *_Nullable error);
367+
typedef void (^PFUserResultBlock)(PFUser *_Nullable user, NSError *_Nullable error);
368+
typedef void (^PFDataResultBlock)(NSData *_Nullable data, NSError *_Nullable error);
369+
typedef void (^PFDataStreamResultBlock)(NSInputStream *_Nullable stream, NSError *_Nullable error);
370+
typedef void (^PFFilePathResultBlock)(NSString *_Nullable filePath, NSError *_Nullable error);
371+
typedef void (^PFStringResultBlock)(NSString *_Nullable string, NSError *_Nullable error);
372+
typedef void (^PFIdResultBlock)(_Nullable id object, NSError *_Nullable error);
373373
typedef void (^PFProgressBlock)(int percentDone);
374374

375375
///--------------------------------------
@@ -379,30 +379,30 @@ typedef void (^PFProgressBlock)(int percentDone);
379379
/**
380380
The name of the notification that is going to be sent before any URL request is sent.
381381
*/
382-
extern NSString *const __nonnull PFNetworkWillSendURLRequestNotification;
382+
extern NSString *const _Nonnull PFNetworkWillSendURLRequestNotification;
383383

384384
/**
385385
The name of the notification that is going to be sent after any URL response is received.
386386
*/
387-
extern NSString *const __nonnull PFNetworkDidReceiveURLResponseNotification;
387+
extern NSString *const _Nonnull PFNetworkDidReceiveURLResponseNotification;
388388

389389
/**
390390
The key of request(NSURLRequest) in the userInfo dictionary of a notification.
391391
@note This key is populated in userInfo, only if `PFLogLevel` on `Parse` is set to `PFLogLevelDebug`.
392392
*/
393-
extern NSString *const __nonnull PFNetworkNotificationURLRequestUserInfoKey;
393+
extern NSString *const _Nonnull PFNetworkNotificationURLRequestUserInfoKey;
394394

395395
/**
396396
The key of response(NSHTTPURLResponse) in the userInfo dictionary of a notification.
397397
@note This key is populated in userInfo, only if `PFLogLevel` on `Parse` is set to `PFLogLevelDebug`.
398398
*/
399-
extern NSString *const __nonnull PFNetworkNotificationURLResponseUserInfoKey;
399+
extern NSString *const _Nonnull PFNetworkNotificationURLResponseUserInfoKey;
400400

401401
/**
402402
The key of repsonse body (usually `NSString` with JSON) in the userInfo dictionary of a notification.
403403
@note This key is populated in userInfo, only if `PFLogLevel` on `Parse` is set to `PFLogLevelDebug`.
404404
*/
405-
extern NSString *const __nonnull PFNetworkNotificationURLResponseBodyUserInfoKey;
405+
extern NSString *const _Nonnull PFNetworkNotificationURLResponseBodyUserInfoKey;
406406

407407

408408
///--------------------------------------

Parse/PFGeoPoint.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
1414

1515
@class PFGeoPoint;
1616

17-
typedef void(^PFGeoPointResultBlock)(PFGeoPoint *__nullable geoPoint, NSError *__nullable error);
17+
typedef void(^PFGeoPointResultBlock)(PFGeoPoint *_Nullable geoPoint, NSError *_Nullable error);
1818

1919
/**
2020
`PFGeoPoint` may be used to embed a latitude / longitude point as the value for a key in a `PFObject`.

Parse/PFPurchase.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ PF_WATCH_UNAVAILABLE_WARNING
2020
NS_ASSUME_NONNULL_BEGIN
2121

2222
typedef void (^PFPurchaseProductObservationBlock)(SKPaymentTransaction *transaction);
23-
typedef void (^PFPurchaseBuyProductResultBlock)(NSError *__nullable error);
24-
typedef void (^PFPurchaseDownloadAssetResultBlock)(NSString *__nullable filePath, NSError *__nullable error);
23+
typedef void (^PFPurchaseBuyProductResultBlock)(NSError *_Nullable error);
24+
typedef void (^PFPurchaseDownloadAssetResultBlock)(NSString *_Nullable filePath, NSError *_Nullable error);
2525

2626
/**
2727
`PFPurchase` provides a set of APIs for working with in-app purchases.

Parse/PFQuery.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
2727
#pragma mark - Blocks
2828
///--------------------------------------
2929

30-
typedef void (^PFQueryArrayResultBlock)(NSArray<PFGenericObject> *__nullable objects, NSError * __nullable error);
30+
typedef void (^PFQueryArrayResultBlock)(NSArray<PFGenericObject> *_Nullable objects, NSError * _Nullable error);
3131

3232
///--------------------------------------
3333
#pragma mark - Creating a Query for a Class
@@ -522,7 +522,7 @@ typedef void (^PFQueryArrayResultBlock)(NSArray<PFGenericObject> *__nullable obj
522522
The block should have the following argument signature: `^(NSArray *object, NSError *error)`
523523
*/
524524
- (void)getObjectInBackgroundWithId:(NSString *)objectId
525-
block:(nullable void (^)(PFGenericObject __nullable object, NSError *__nullable error))block;
525+
block:(nullable void (^)(PFGenericObject _Nullable object, NSError *_Nullable error))block;
526526

527527
///--------------------------------------
528528
#pragma mark - Getting User Objects
@@ -575,7 +575,7 @@ typedef void (^PFQueryArrayResultBlock)(NSArray<PFGenericObject> *__nullable obj
575575
`result` will be `nil` if `error` is set OR no object was found matching the query.
576576
`error` will be `nil` if `result` is set OR if the query succeeded, but found no results.
577577
*/
578-
- (void)getFirstObjectInBackgroundWithBlock:(nullable void (^)(PFGenericObject __nullable object, NSError *__nullable error))block;
578+
- (void)getFirstObjectInBackgroundWithBlock:(nullable void (^)(PFGenericObject _Nullable object, NSError *_Nullable error))block;
579579

580580
///--------------------------------------
581581
#pragma mark - Counting the Matches in a Query

Parse/PFSession.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
1818

1919
@class PFSession;
2020

21-
typedef void(^PFSessionResultBlock)(PFSession *__nullable session, NSError *__nullable error);
21+
typedef void(^PFSessionResultBlock)(PFSession *_Nullable session, NSError *_Nullable error);
2222

2323
/**
2424
`PFSession` is a local representation of a session.

0 commit comments

Comments
 (0)