From 8e70ff7b102d84b022816312a202f5a09810dfa9 Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 11 Jul 2003 00:35:21 +0000 Subject: [PATCH] Store the instance using the correct key in the thread dictionary. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17185 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Source/NSAssertionHandler.m | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a6ce7e3ba..92fbf55af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-07-11 02:33 Alexander Malmberg + + * Source/NSAssertionHandler.m: Use the correct key to store the + NSAssertionHandler in the thread dictionary, and document the + storing and the key. + 2003-07-09 15:54 Alexander Malmberg * Source/Additions/Unicode.m (GSToUnicode, GSFromUnicode): Make sure diff --git a/Source/NSAssertionHandler.m b/Source/NSAssertionHandler.m index 055032ca6..181f42948 100644 --- a/Source/NSAssertionHandler.m +++ b/Source/NSAssertionHandler.m @@ -42,6 +42,11 @@ * source file, the position within that file, and the name of the * ObjC method or C function in which the assertion failed. *

+ *

An NSAssertionHandler instance is created on demand for each thread + * and is stored in the thread's dictionary under the key NSAssertionHandler. + * A custom NSAssertionHandler can be used by adding it to the thread + * dictionary under this key. + *

* The assertion macros are: * NSAssert(), NSCAssert(), * NSAssert1(), NSCAssert1(), @@ -54,7 +59,7 @@ @implementation NSAssertionHandler /* Key for thread dictionary. */ -static NSString *dict_key = @"_NSAssertionHandler"; +static NSString *dict_key = @"NSAssertionHandler"; /** * Returns the assertion handler object for the current thread.