Eliminate redundant _internal variable

This commit is contained in:
Gregory John Casamento 2019-08-05 00:00:55 -04:00
parent 4f02bb6f87
commit 8d35169311
2 changed files with 8 additions and 14 deletions

View file

@ -59,7 +59,7 @@ typedef NSInteger NSOperationQueuePriority;
@public GS_NSOperation_IVARS
# endif
#else
@protected id _internal;
@private id _internal;
#endif
}
@ -202,11 +202,9 @@ typedef NSInteger NSOperationQueuePriority;
@interface NSBlockOperation : NSOperation
{
#if GS_NONFRAGILE
# if defined(GS_NSBlockOperation_IVARS)
@public GS_NSBlockOperation_IVARS
# endif
#endif
@private
NSMutableArray *_executionBlocks;
void *_reserved;
}
// Managing the blocks in the Operation

View file

@ -44,9 +44,6 @@
NSMutableArray *dependencies; \
GSOperationCompletionBlock completionBlock;
#define GS_NSBlockOperation_IVARS \
NSMutableArray *executionBlocks;
#define GS_NSOperationQueue_IVARS \
NSRecursiveLock *lock; \
NSConditionLock *cond; \
@ -545,15 +542,14 @@ static NSArray *empty = nil;
self = [super init];
if(self != nil)
{
GS_CREATE_INTERNAL(NSBlockOperation);
internal->executionBlocks = [[NSMutableArray alloc] initWithCapacity: 10];
_executionBlocks = [[NSMutableArray alloc] initWithCapacity: 10];
}
return self;
}
- (void) dealloc
{
RELEASE(internal->executionBlocks);
RELEASE(_executionBlocks);
[super dealloc];
}
@ -567,12 +563,12 @@ static NSArray *empty = nil;
- (void)addExecutionBlock: (GSBlockOperationBlock)block
{
[internal->executionBlocks addObject: block];
[_executionBlocks addObject: block];
}
- (NSArray *) executionBlocks
{
return internal->executionBlocks;
return _executionBlocks;
}
- (void) main