mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
Preliminary code for emulation of the objc2 runtime weak reference feature
This commit is contained in:
parent
950e2a5f07
commit
c66bd6ec5c
11 changed files with 472 additions and 81 deletions
|
@ -1,21 +1,10 @@
|
|||
#import "ObjectTesting.h"
|
||||
#import <Foundation/NSAutoreleasePool.h>
|
||||
#import <Foundation/NSPointerArray.h>
|
||||
#if __has_include(<objc/capabilities.h>)
|
||||
#include <objc/capabilities.h>
|
||||
#endif
|
||||
|
||||
int main()
|
||||
{
|
||||
START_SET("NSPointerArray weak objects")
|
||||
#if !__APPLE__ // We assume that apple systems support zeroing weak pointers
|
||||
#ifdef OBJC_CAP_ARC
|
||||
if (!objc_test_capability(OBJC_CAP_ARC))
|
||||
#endif
|
||||
{
|
||||
SKIP("ARC support unavailable")
|
||||
}
|
||||
#endif
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
NSPointerArray *array = [NSPointerArray weakObjectsPointerArray];
|
||||
int index;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue