mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
changes from bug #40930
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37478 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9fd1bf4218
commit
65039c3531
4 changed files with 26 additions and 6 deletions
|
@ -3,6 +3,8 @@
|
|||
* Headers/Foundation/NSStream.h: OSX compatibilityy ... use formal
|
||||
protocol if possible (bug #40925).
|
||||
* Headers/GNUstepBase/GSVersionMacros.h: OSX 10.9 define added.
|
||||
* Headers/Foundation/NSRunLoop.h:
|
||||
* Source/NSRunLoop.m: Implement ([+mainRunLoop])
|
||||
|
||||
2013-12-13 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
|
|
|
@ -53,8 +53,18 @@ GS_EXPORT NSString * const NSDefaultRunLoopMode;
|
|||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the run loop instance for the current thread.
|
||||
*/
|
||||
+ (NSRunLoop*) currentRunLoop;
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST)
|
||||
/**
|
||||
* Returns the run loop instance of the main thread.
|
||||
*/
|
||||
+ (NSRunLoop*) mainRunLoop;
|
||||
#endif
|
||||
|
||||
- (void) acceptInputForMode: (NSString*)mode
|
||||
beforeDate: (NSDate*)limit_date;
|
||||
|
||||
|
|
|
@ -270,7 +270,8 @@ GS_EXPORT NSString * const NSStreamSOCKSProxyVersion4;
|
|||
GS_EXPORT NSString * const NSStreamSOCKSProxyVersion5;
|
||||
GS_EXPORT NSString * const NSStreamSOCKSProxyVersionKey;
|
||||
|
||||
#ifdef _clang_ /* FIXME ... this is not clang specific */
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7,GS_API_LATEST) && defined(_clang_)
|
||||
/* FIXME ... this is not clang specific */
|
||||
@protocol NSStreamDelegate <NSObject>
|
||||
@optional
|
||||
#else
|
||||
|
|
|
@ -710,12 +710,9 @@ static inline BOOL timerInvalidated(NSTimer *t)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the run loop instance for the current thread.
|
||||
*/
|
||||
+ (NSRunLoop*) currentRunLoop
|
||||
+ (NSRunLoop*) _runLoopForThread: (NSThread*) aThread
|
||||
{
|
||||
GSRunLoopThreadInfo *info = GSRunLoopInfoForThread(nil);
|
||||
GSRunLoopThreadInfo *info = GSRunLoopInfoForThread(aThread);
|
||||
NSRunLoop *current = info->loop;
|
||||
|
||||
if (nil == current)
|
||||
|
@ -772,6 +769,16 @@ static inline BOOL timerInvalidated(NSTimer *t)
|
|||
return current;
|
||||
}
|
||||
|
||||
+ (NSRunLoop*) currentRunLoop
|
||||
{
|
||||
return [self _runLoopForThread: nil];
|
||||
}
|
||||
|
||||
+ (NSRunLoop*) mainRunLoop
|
||||
{
|
||||
return [self _runLoopForThread: [NSThread mainThread]];
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
DESTROY(self);
|
||||
|
|
Loading…
Reference in a new issue