Skip to content

Instantly share code, notes, and snippets.

@rentzsch
Created July 2, 2009 20:37
Show Gist options
  • Save rentzsch/139705 to your computer and use it in GitHub Desktop.
Save rentzsch/139705 to your computer and use it in GitHub Desktop.
#import <Foundation/Foundation.h>
#define SPARKLE_CUSTOM_CLASS_PREFIX 1
#ifdef SPARKLE_CUSTOM_CLASS_PREFIX
#define SPARKLE_CLASS(ORIGINAL_CLASS_NAME) ClickToFlash_##ORIGINAL_CLASS_NAME
#else
#define SPARKLE_CLASS(ORIGINAL_CLASS_NAME) ORIGINAL_CLASS_NAME
#endif
@interface SPARKLE_CLASS(SUUpdater) : NSObject{}
@end
@implementation SPARKLE_CLASS(SUUpdater)
@end
int main (int argc, const char * argv[]) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
SPARKLE_CLASS(SUUpdater) *updater = [[[SPARKLE_CLASS(SUUpdater) alloc] init] autorelease];
NSLog(@"updater className: %@", [updater className]); // ==> "updater className: ClickToFlash_SUUpdater"
[pool drain];
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment