mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Eliminate redundant _internal variable
This commit is contained in:
parent
4f02bb6f87
commit
8d35169311
2 changed files with 8 additions and 14 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue