@@ -103,7 +103,7 @@ @interface PFObject () <PFObjectPrivateSubclass> {
103103 // Guards basically all of the variables below.
104104 NSObject *lock;
105105
106- PFObjectState *_state ;
106+ PFObjectState *_pfinternal_state ;
107107
108108 PFObjectEstimatedData *_estimatedData;
109109 NSMutableSet *_availableKeys; // TODO: (nlutsenko) Maybe decouple this further.
@@ -818,7 +818,7 @@ - (void)checkForChangesToMutableContainers {
818818- (void )setHasBeenFetched : (BOOL )fetched {
819819 @synchronized (lock) {
820820 if (self._state .complete != fetched) {
821- PFMutableObjectState *state = [_state mutableCopy ];
821+ PFMutableObjectState *state = [_pfinternal_state mutableCopy ];
822822 state.complete = fetched;
823823 self._state = state;
824824 }
@@ -828,7 +828,7 @@ - (void)setHasBeenFetched:(BOOL)fetched {
828828- (void )_setDeleted : (BOOL )deleted {
829829 @synchronized (lock) {
830830 if (self._state .deleted != deleted) {
831- PFMutableObjectState *state = [_state mutableCopy ];
831+ PFMutableObjectState *state = [_pfinternal_state mutableCopy ];
832832 state.deleted = deleted;
833833 self._state = state;
834834 }
@@ -1718,7 +1718,6 @@ - (NSDictionary *)_collectFetchedObjects {
17181718
17191719@implementation PFObject
17201720
1721- @synthesize _state = _state;
17221721@synthesize _availableKeys = _availableKeys;
17231722
17241723// /--------------------------------------
@@ -1729,26 +1728,26 @@ - (instancetype)init {
17291728 self = [super init ];
17301729 if (!self) return nil ;
17311730
1732- if (!_state ) {
1731+ if (!_pfinternal_state ) {
17331732 PFConsistencyAssert ([self conformsToProtocol: @protocol (PFSubclassing)],
17341733 @" Can only call -[PFObject init] on subclasses conforming to PFSubclassing." );
17351734 [PFObject assertSubclassIsRegistered: [self class ]];
1736- _state = [[self class ] _newObjectStateWithParseClassName: [[self class ] parseClassName ]
1737- objectId: nil
1738- isComplete: YES ];
1735+ _pfinternal_state = [[self class ] _newObjectStateWithParseClassName: [[self class ] parseClassName ]
1736+ objectId: nil
1737+ isComplete: YES ];
17391738 }
1740- [[self class ] _assertValidInstanceClassName: _state .parseClassName];
1739+ [[self class ] _assertValidInstanceClassName: _pfinternal_state .parseClassName];
17411740
17421741 lock = [[NSObject alloc ] init ];
17431742 operationSetQueue = [NSMutableArray arrayWithObject: [[PFOperationSet alloc ] init ]];
1744- _estimatedData = [PFObjectEstimatedData estimatedDataFromServerData: _state .serverData
1743+ _estimatedData = [PFObjectEstimatedData estimatedDataFromServerData: _pfinternal_state .serverData
17451744 operationSetQueue: operationSetQueue];
17461745 _availableKeys = [NSMutableSet set ];
17471746 hashedObjectsCache = [[NSMutableDictionary alloc ] init ];
17481747 self.taskQueue = [[PFTaskQueue alloc ] init ];
17491748 _eventuallyTaskQueue = [[PFTaskQueue alloc ] init ];
17501749
1751- if (_state .complete ) {
1750+ if (_pfinternal_state .complete ) {
17521751 dirty = YES ;
17531752 [self setDefaultValues ];
17541753 }
@@ -1762,7 +1761,7 @@ - (instancetype)initWithClassName:(NSString *)className {
17621761}
17631762
17641763- (instancetype )initWithObjectState : (PFObjectState *)state {
1765- _state = state;
1764+ _pfinternal_state = state;
17661765 return [self init ];
17671766}
17681767
@@ -1853,12 +1852,12 @@ - (BFTask *)_validateSaveEventuallyAsync {
18531852
18541853- (void )set_state : (PFObjectState *)state {
18551854 @synchronized (lock) {
1856- NSString *oldObjectId = _state .objectId ;
1855+ NSString *oldObjectId = _pfinternal_state .objectId ;
18571856 if (self._state != state) {
1858- _state = [state copy ];
1857+ _pfinternal_state = [state copy ];
18591858 }
18601859
1861- NSString *newObjectId = _state .objectId ;
1860+ NSString *newObjectId = _pfinternal_state .objectId ;
18621861 if (![PFObjectUtilities isObject: oldObjectId equalToObject: newObjectId]) {
18631862 [self _notifyObjectIdChangedFrom: oldObjectId toObjectId: newObjectId];
18641863 }
@@ -1867,7 +1866,7 @@ - (void)set_state:(PFObjectState *)state {
18671866
18681867- (PFObjectState *)_state {
18691868 @synchronized (lock) {
1870- return _state ;
1869+ return _pfinternal_state ;
18711870 }
18721871}
18731872
@@ -1888,7 +1887,7 @@ - (void)setObjectId:(NSString *)objectId {
18881887
18891888 PFMutableObjectState *state = [self ._state mutableCopy ];
18901889 state.objectId = objectId;
1891- _state = state;
1890+ _pfinternal_state = state;
18921891
18931892 [self _notifyObjectIdChangedFrom: oldObjectId toObjectId: objectId];
18941893 }
0 commit comments