objc_container.h 523 B

1234567891011121314151617181920212223242526
  1. @protocol P @end
  2. @interface NSMutableArray
  3. - (id)objectAtIndexedSubscript:(unsigned int)index;
  4. - (void)setObject:(id)object atIndexedSubscript:(unsigned int)index;
  5. @end
  6. @interface NSMutableDictionary
  7. - (id)objectForKeyedSubscript:(id)key;
  8. - (void)setObject:(id)object forKeyedSubscript:(id)key;
  9. @end
  10. void all() {
  11. NSMutableArray *array;
  12. id oldObject = array[10];
  13. array[10] = oldObject;
  14. NSMutableDictionary *dictionary;
  15. id key;
  16. id newObject;
  17. oldObject = dictionary[key];
  18. dictionary[key] = newObject;
  19. }