diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-02-19 00:18:31 +0100 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-02-19 00:18:31 +0100 |
commit | 272a6c36bf2c91985bf7ec87da8d4576393c6e84 (patch) | |
tree | a0d5fb19f8b3aefd2e6a4fa10bb6e5a8eb9341aa /Objective-C/NSObject-ObjectiveCLWrapperLink.m | |
parent | 806872f29587bb24d215cf2c4a94513376130fd1 (diff) |
Remove NSObject category ObjectiveCLWrapperLink.
darcs-hash:07ee45edca14214270891334f18d56f30e4ea57a
Diffstat (limited to 'Objective-C/NSObject-ObjectiveCLWrapperLink.m')
-rw-r--r-- | Objective-C/NSObject-ObjectiveCLWrapperLink.m | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/Objective-C/NSObject-ObjectiveCLWrapperLink.m b/Objective-C/NSObject-ObjectiveCLWrapperLink.m deleted file mode 100644 index 8d34a19..0000000 --- a/Objective-C/NSObject-ObjectiveCLWrapperLink.m +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- mode: objc; coding: utf-8 -*- */ - -#import "NSObject-ObjectiveCLWrapperLink.h" -#import <Foundation/NSSet.h> -#import <Foundation/NSObject.h> -#import <Foundation/NSString.h> - -/* A class is considered Lisp-backed if some of its methods are - implemented as Lisp callbacks. This is true if and only if - @selector(retain) and @selector(release) are overridden by - Objective-CL. In this case, the corresponding Lisp objects are - stored in a regular hash table instead of a weak one, as they may - hold data (like CLOS slots) that we can't do without as long as the - Objective-C instance is referenced from anywhere (where `anywhere' - includes both the Lisp and Objective-C worlds). */ -static NSMutableSet *lisp_backed_classes = nil; - -void -objcl_initialise_instance_wrappers (void) -{ - if (lisp_backed_classes == nil) - lisp_backed_classes = [[NSMutableSet alloc] init]; -} - -void -objcl_shutdown_instance_wrappers (void) -{ - if (lisp_backed_classes != nil) - { - [lisp_backed_classes release]; - lisp_backed_classes = nil; - } -} - -@implementation NSObject (ObjectiveCLWrapperLink) -+(BOOL) __objcl_isBackedByLispClass -{ - return [lisp_backed_classes containsObject: self]; -} - -+(void) __objcl_setBackedByLispClass: (BOOL)backed_p -{ - if (backed_p) - [lisp_backed_classes addObject: self]; - else - [lisp_backed_classes removeObject: self]; -} -@end /* NSObject (ObjectiveCL) */ |