concurrentcat_category.m 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #include <stdio.h>
  2. #include <objc/runtime.h>
  3. #import <Foundation/Foundation.h>
  4. @interface TargetClass : NSObject
  5. @end
  6. @interface TargetClass(LoadedMethods)
  7. - (void) m0;
  8. - (void) m1;
  9. - (void) m2;
  10. - (void) m3;
  11. - (void) m4;
  12. - (void) m5;
  13. - (void) m6;
  14. - (void) m7;
  15. - (void) m8;
  16. - (void) m9;
  17. - (void) m10;
  18. - (void) m11;
  19. - (void) m12;
  20. - (void) m13;
  21. - (void) m14;
  22. - (void) m15;
  23. @end
  24. @interface TN:TargetClass
  25. @end
  26. @implementation TN
  27. - (void) m1 { [super m1]; }
  28. - (void) m3 { [self m1]; }
  29. - (void) m2
  30. {
  31. [self willChangeValueForKey: @"m4"];
  32. [self didChangeValueForKey: @"m4"];
  33. }
  34. - (void)observeValueForKeyPath:(NSString *) keyPath
  35. ofObject:(id)object
  36. change:(NSDictionary *)change
  37. context:(void *)context
  38. {
  39. // suppress warning
  40. keyPath = nil;
  41. object = nil;
  42. change = nil;
  43. context = NULL;
  44. }
  45. @end
  46. @implementation TargetClass(LoadedMethods)
  47. - (void) m0 { ; }
  48. - (void) m1 { ; }
  49. - (void) m2 { ; }
  50. - (void) m3 { ; }
  51. - (void) m4 { ; }
  52. - (void) m5 { ; }
  53. - (void) m6 { ; }
  54. - (void) m7 { ; }
  55. - (void) m8 { ; }
  56. - (void) m9 { ; }
  57. - (void) m10 { ; }
  58. - (void) m11 { ; }
  59. - (void) m12 { ; }
  60. - (void) m13 { ; }
  61. - (void) m14 { ; }
  62. - (void) m15 { ; }
  63. @end