Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // NSObject+arcAgnostics.h
- //
- // Created by Jonathan Annett on 1/11/13.
- // Copyright (c) 2013 Sophtwhere. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- @interface NSObject (arcAgnostics)
- -(id) __SELF__;
- -(void) __NOP__;
- @end
- #if __has_feature(objc_arc)
- #define release __NOP__
- #define autorelease __SELF__
- #define retain __SELF__
- #define SUPER_DEALLOC self __NOP__
- #undef Block_copy
- #undef Block_release
- #define Block_copy(...) ((__bridge __typeof(__VA_ARGS__))_Block_copy((__bridge const void *)(__VA_ARGS__)))
- #define Block_release(...) _Block_release((__bridge const void *)(__VA_ARGS__))
- #else
- #define SUPER_DEALLOC super dealloc
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement