mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Expose 10.6-compatible interface for per-thread assertion handlers.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31593 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
59ee016e3e
commit
a3d6bd2eab
2 changed files with 5 additions and 3 deletions
|
@ -57,7 +57,8 @@
|
|||
@implementation NSAssertionHandler
|
||||
|
||||
/* Key for thread dictionary. */
|
||||
static NSString *dict_key = @"NSAssertionHandler";
|
||||
NSString *const NSAssertionHandlerKey = @"NSAssertionHandler";
|
||||
|
||||
|
||||
/**
|
||||
* Returns the assertion handler object for the current thread.<br />
|
||||
|
@ -69,11 +70,11 @@ static NSString *dict_key = @"NSAssertionHandler";
|
|||
NSAssertionHandler *handler;
|
||||
|
||||
dict = GSCurrentThreadDictionary();
|
||||
handler = [dict objectForKey: dict_key];
|
||||
handler = [dict objectForKey: NSAssertionHandlerKey];
|
||||
if (handler == nil)
|
||||
{
|
||||
handler = [[NSAssertionHandler alloc] init];
|
||||
[dict setObject: handler forKey: dict_key];
|
||||
[dict setObject: handler forKey: NSAssertionHandlerKey];
|
||||
RELEASE(handler);
|
||||
}
|
||||
return handler;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue