]> git.saurik.com Git - apple/objc4.git/blobdiff - test/weak.h
objc4-493.9.tar.gz
[apple/objc4.git] / test / weak.h
index a7bb2e500fca6b96df32931c45936c9ad51897cc..bacc39e1f47b0430570e9207b422ecc1b0393ffd 100644 (file)
@@ -1,8 +1,24 @@
+/*
+  To test -weak-l or -weak-framework:
+  * -DWEAK_IMPORT=
+  * -DWEAK_FRAMEWORK=1
+  * -UEMPTY  when building the weak-not-missing library
+  * -DEMPTY= when building the weak-missing library
+
+  To test attribute((weak_import)):
+  * -DWEAK_IMPORT=__attribute__((weak_import))
+  * -UWEAK_FRAMEWORK
+  * -UEMPTY  when building the weak-not-missing library
+  * -DEMPTY= when building the weak-missing library
+
+*/
 #include "test.h"
 #include <objc/runtime.h>
 
 extern int state;
 
+WEAK_IMPORT
 @interface MissingRoot {
     id isa;
 }
@@ -10,9 +26,11 @@ extern int state;
 +(Class) class;
 +(id) alloc;
 -(id) init;
+-(void) dealloc;
 +(int) method;
 @end
 
+WEAK_IMPORT
 @interface MissingSuper : MissingRoot {
   @public
     int ivar;
@@ -27,6 +45,7 @@ extern int state;
 +(Class) class;
 +(id) alloc;
 -(id) init;
+-(void) dealloc;
 +(int) method;
 @end