@@ -103,7 +103,7 @@ @interface PFObject () <PFObjectPrivateSubclass> {
103
103
// Guards basically all of the variables below.
104
104
NSObject *lock;
105
105
106
- PFObjectState *_state ;
106
+ PFObjectState *_pfinternal_state ;
107
107
108
108
PFObjectEstimatedData *_estimatedData;
109
109
NSMutableSet *_availableKeys; // TODO: (nlutsenko) Maybe decouple this further.
@@ -818,7 +818,7 @@ - (void)checkForChangesToMutableContainers {
818
818
- (void )setHasBeenFetched : (BOOL )fetched {
819
819
@synchronized (lock) {
820
820
if (self._state .complete != fetched) {
821
- PFMutableObjectState *state = [_state mutableCopy ];
821
+ PFMutableObjectState *state = [_pfinternal_state mutableCopy ];
822
822
state.complete = fetched;
823
823
self._state = state;
824
824
}
@@ -828,7 +828,7 @@ - (void)setHasBeenFetched:(BOOL)fetched {
828
828
- (void )_setDeleted : (BOOL )deleted {
829
829
@synchronized (lock) {
830
830
if (self._state .deleted != deleted) {
831
- PFMutableObjectState *state = [_state mutableCopy ];
831
+ PFMutableObjectState *state = [_pfinternal_state mutableCopy ];
832
832
state.deleted = deleted;
833
833
self._state = state;
834
834
}
@@ -1718,7 +1718,6 @@ - (NSDictionary *)_collectFetchedObjects {
1718
1718
1719
1719
@implementation PFObject
1720
1720
1721
- @synthesize _state = _state;
1722
1721
@synthesize _availableKeys = _availableKeys;
1723
1722
1724
1723
// /--------------------------------------
@@ -1729,26 +1728,26 @@ - (instancetype)init {
1729
1728
self = [super init ];
1730
1729
if (!self) return nil ;
1731
1730
1732
- if (!_state ) {
1731
+ if (!_pfinternal_state ) {
1733
1732
PFConsistencyAssert ([self conformsToProtocol: @protocol (PFSubclassing)],
1734
1733
@" Can only call -[PFObject init] on subclasses conforming to PFSubclassing." );
1735
1734
[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 ];
1739
1738
}
1740
- [[self class ] _assertValidInstanceClassName: _state .parseClassName];
1739
+ [[self class ] _assertValidInstanceClassName: _pfinternal_state .parseClassName];
1741
1740
1742
1741
lock = [[NSObject alloc ] init ];
1743
1742
operationSetQueue = [NSMutableArray arrayWithObject: [[PFOperationSet alloc ] init ]];
1744
- _estimatedData = [PFObjectEstimatedData estimatedDataFromServerData: _state .serverData
1743
+ _estimatedData = [PFObjectEstimatedData estimatedDataFromServerData: _pfinternal_state .serverData
1745
1744
operationSetQueue: operationSetQueue];
1746
1745
_availableKeys = [NSMutableSet set ];
1747
1746
hashedObjectsCache = [[NSMutableDictionary alloc ] init ];
1748
1747
self.taskQueue = [[PFTaskQueue alloc ] init ];
1749
1748
_eventuallyTaskQueue = [[PFTaskQueue alloc ] init ];
1750
1749
1751
- if (_state .complete ) {
1750
+ if (_pfinternal_state .complete ) {
1752
1751
dirty = YES ;
1753
1752
[self setDefaultValues ];
1754
1753
}
@@ -1762,7 +1761,7 @@ - (instancetype)initWithClassName:(NSString *)className {
1762
1761
}
1763
1762
1764
1763
- (instancetype )initWithObjectState : (PFObjectState *)state {
1765
- _state = state;
1764
+ _pfinternal_state = state;
1766
1765
return [self init ];
1767
1766
}
1768
1767
@@ -1853,12 +1852,12 @@ - (BFTask *)_validateSaveEventuallyAsync {
1853
1852
1854
1853
- (void )set_state : (PFObjectState *)state {
1855
1854
@synchronized (lock) {
1856
- NSString *oldObjectId = _state .objectId ;
1855
+ NSString *oldObjectId = _pfinternal_state .objectId ;
1857
1856
if (self._state != state) {
1858
- _state = [state copy ];
1857
+ _pfinternal_state = [state copy ];
1859
1858
}
1860
1859
1861
- NSString *newObjectId = _state .objectId ;
1860
+ NSString *newObjectId = _pfinternal_state .objectId ;
1862
1861
if (![PFObjectUtilities isObject: oldObjectId equalToObject: newObjectId]) {
1863
1862
[self _notifyObjectIdChangedFrom: oldObjectId toObjectId: newObjectId];
1864
1863
}
@@ -1867,7 +1866,7 @@ - (void)set_state:(PFObjectState *)state {
1867
1866
1868
1867
- (PFObjectState *)_state {
1869
1868
@synchronized (lock) {
1870
- return _state ;
1869
+ return _pfinternal_state ;
1871
1870
}
1872
1871
}
1873
1872
@@ -1888,7 +1887,7 @@ - (void)setObjectId:(NSString *)objectId {
1888
1887
1889
1888
PFMutableObjectState *state = [self ._state mutableCopy ];
1890
1889
state.objectId = objectId;
1891
- _state = state;
1890
+ _pfinternal_state = state;
1892
1891
1893
1892
[self _notifyObjectIdChangedFrom: oldObjectId toObjectId: objectId];
1894
1893
}
0 commit comments