diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-17 21:20:42 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-17 21:20:42 +0200 |
commit | 164e403a974165af103fa072d0f14e2e256153be (patch) | |
tree | 17aa5feae4fef9eebeed7e30efd5a9e20b1d1c5d /MLKPackage.m | |
parent | b11b87db720955acae99a558ef18dd5b6995022d (diff) |
MLKDynamicContext#+initialize: Fix various sources of crashes.
Diffstat (limited to 'MLKPackage.m')
-rw-r--r-- | MLKPackage.m | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/MLKPackage.m b/MLKPackage.m index d7ac803..ec74fce 100644 --- a/MLKPackage.m +++ b/MLKPackage.m @@ -29,18 +29,19 @@ static NSMutableDictionary *packages = nil; -@implementation MLKPackage : MLKLispValue +@implementation MLKPackage ++(void) initialize +{ + packages = [[NSMutableDictionary alloc] init]; +} + -(MLKPackage *) initWithName:(NSString *)name nicknames:(NSSet *)nicknames { int i; NSArray *e; - self = [self init]; - - // FIXME: Make this thread-safe. - if (!packages) - packages = [[NSMutableDictionary alloc] init]; + self = [super init]; [packages setObject:self forKey:name]; |