File tree Expand file tree Collapse file tree 9 files changed +16
-10
lines changed Expand file tree Collapse file tree 9 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ + (nullable NSDictionary *)findCommandParametersWithOrder:(NSString *)order
202202 parameters[@" where" ] = whereData;
203203 }
204204 if (encodingFailed && encodingError) {
205- * error = encodingError;
205+ PFSetError ( error, encodingError) ;
206206 return nil ;
207207 }
208208
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ NS_ASSUME_NONNULL_BEGIN
3535#pragma mark - Getting
3636// /--------------------------------------
3737
38- - (NSString *)objectForKey : (NSString *)key maxAge : (NSTimeInterval )age ;
38+ - (nullable NSString *)objectForKey : (NSString *)key maxAge : (NSTimeInterval )age ;
3939
4040// /--------------------------------------
4141#pragma mark - Removing
Original file line number Diff line number Diff line change 8585 @return Current object state.
8686 */
8787@property (nonatomic , copy ) PFObjectState *_state;
88- @property (nonatomic , copy ) NSMutableSet *_availableKeys;
88+ @property (nonatomic , retain ) NSMutableSet *_availableKeys;
8989
9090- (instancetype )initWithObjectState : (PFObjectState *)state ;
9191+ (instancetype )objectWithClassName : (NSString *)className
Original file line number Diff line number Diff line change 77 * of patent rights can be found in the PATENTS file in the same directory.
88 */
99
10+ #import " PFAssert.h"
1011#import " PFObjectState.h"
1112#import " PFObjectState_Private.h"
1213
@@ -129,7 +130,7 @@ - (NSDictionary *)dictionaryRepresentationWithObjectEncoder:(PFEncoder *)objectE
129130 result[key] = encoded;
130131 }];
131132 if (failed && encodingError) {
132- * error = encodingError;
133+ PFSetError ( error, encodingError) ;
133134 return nil ;
134135 }
135136 return [result copy ];
Original file line number Diff line number Diff line change @@ -20,9 +20,9 @@ NS_ASSUME_NONNULL_BEGIN
2020#pragma mark - Operations
2121// /--------------------------------------
2222
23- + (id )newValueByApplyingFieldOperation : (PFFieldOperation *)operation
24- toDictionary : (NSMutableDictionary *)dictionary
25- forKey : (NSString *)key ;
23+ + (nullable id )newValueByApplyingFieldOperation : (PFFieldOperation *)operation
24+ toDictionary : (NSMutableDictionary *)dictionary
25+ forKey : (NSString *)key ;
2626+ (void )applyOperationSet : (PFOperationSet *)operationSet toDictionary : (NSMutableDictionary *)dictionary ;
2727
2828// /--------------------------------------
Original file line number Diff line number Diff line change @@ -81,6 +81,11 @@ if (!(condition) && error && *error == nil) { \
8181 return rval;\
8282}
8383
84+ #define PFSetError (errorPointer, error ) \
85+ if (errorPointer) {\
86+ *errorPointer = error;\
87+ }
88+
8489/*
8590 Returns the passed value if the condition isn't met and the *error is set
8691 */
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ NS_ASSUME_NONNULL_BEGIN
7878#pragma mark - Caching
7979// /--------------------------------------
8080
81- - (NSString *)cacheKeyForQueryState : (PFQueryState *)queryState sessionToken : (nullable NSString *)sessionToken ;
81+ - (nullable NSString *)cacheKeyForQueryState : (PFQueryState *)queryState sessionToken : (nullable NSString *)sessionToken ;
8282- (BOOL )hasCachedResultForQueryState : (PFQueryState *)queryState sessionToken : (nullable NSString *)sessionToken ;
8383
8484- (void )clearCachedResultForQueryState : (PFQueryState *)queryState sessionToken : (nullable NSString *)sessionToken ;
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ - (id)encodeObject:(id)object error:(NSError * __autoreleasing *) error {
107107 }
108108 }];
109109 if (encodingFailed) {
110- * error = encodingError;
110+ PFSetError ( error, encodingError) ;
111111 return nil ;
112112 }
113113 return dict;
Original file line number Diff line number Diff line change @@ -245,7 +245,7 @@ + (BOOL)collectDirtyChildren:(id)node
245245 }
246246 }];
247247 if (wasStopped) {
248- * error = localError;
248+ PFSetError ( error, localError) ;
249249 return NO ;
250250 }
251251 } else if ([node isKindOfClass: [PFACL class ]]) {
You can’t perform that action at this time.
0 commit comments