Skip to content

Commit 2b4ba04

Browse files
committed
Fixups to copile on more platforms
1 parent d3594a5 commit 2b4ba04

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

Source/NSOperation.m

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -619,14 +619,12 @@ - (void) main
619619

620620
@interface NSOperationQueue (Private)
621621
- (void) _execute;
622-
- (void) _main: (NSOperation *)op;
623-
#if GS_USE_LIBDISPATCH == 1
624622
- (id) _initMainQueue;
625-
#endif
626623
- (NSRecursiveLock *) _internalLock;
627624
- (NSMutableArray *) _internalOperations;
628625
- (NSMutableArray *) _internalWaiting;
629626
- (NSInteger *) _internalExecutingPtr;
627+
- (void) _main: (NSOperation *)op;
630628

631629
- (void) observeValueForKeyPath: (NSString *)keyPath
632630
ofObject: (id)object
@@ -1216,6 +1214,18 @@ - (void) waitUntilAllOperationsAreFinished
12161214

12171215
@implementation NSOperationQueue (Private)
12181216

1217+
- (id) _initMainQueue
1218+
{
1219+
if ((self = [self init]) != nil)
1220+
{
1221+
[internal->lock lock];
1222+
internal->maxThreads = 1;
1223+
[internal->queueImpl initAsMainQueue];
1224+
[internal->lock unlock];
1225+
}
1226+
return self;
1227+
}
1228+
12191229
- (NSRecursiveLock *) _internalLock
12201230
{
12211231
return internal->lock;

0 commit comments

Comments
 (0)