#include <Foundation/NSString.h>
#include <gperftools/heap-profiler.h>

//Class MLTestClass;

@interface MLTestClass: NSObject {
@public
}
- (id)init;
- (void)someF;
@end

@implementation MLTestClass
- (id)init
{
        return [super init];
}

- (void)someF
{
}

@end

static void ff(id obj, SEL _cmd)
{
}

int main()
{
        static char static_char;
        MLTestClass * tc;
        tc =  [[MLTestClass alloc] init];
        objc_setAssociatedObject(tc, &static_char, (id)1223, OBJC_ASSOCIATION_ASSIGN);
        [tc release];
        tc =  [[MLTestClass alloc] init];
        
        objc_setAssociatedObject(tc, &static_char, (id)1223, OBJC_ASSOCIATION_ASSIGN);
	static SEL some_sel = NULL;
        if (NULL == some_sel)
        {       
                some_sel = sel_registerName(".some_sel");
        }
        const char *types = sizeof(void*) == 4 ? "v8@0:4" : "v16@0:8";
        class_addMethod(object_getClass(tc), some_sel,
                        (IMP)ff, types);
/*        [tc performSelector:some_sel];*/
        [tc release];
}
