ObjFW  Diff

Differences From Artifact [6bb0937ec0]:

To Artifact [5ec64d7fc7]:


69
70
71
72
73
74
75
76
77

78
79
80
81
82
	autoreleaseMethod = class_getInstanceMethod(NSObject,
	    @selector(autorelease));

	if (allocMethod == NULL || addObjectMethod == NULL ||
	    autoreleaseMethod == NULL)
		return;

	class_replaceMethod(NSAutoreleasePool->isa, @selector(alloc),
	    (IMP)alloc, method_getTypeEncoding(allocMethod));

	class_replaceMethod(NSAutoreleasePool->isa, @selector(addObject:),
	    (IMP)addObject, method_getTypeEncoding(addObjectMethod));
	class_replaceMethod(NSObject, @selector(autorelease),
	    (IMP)autorelease, method_getTypeEncoding(autoreleaseMethod));
}







|
|
>
|
|



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
	autoreleaseMethod = class_getInstanceMethod(NSObject,
	    @selector(autorelease));

	if (allocMethod == NULL || addObjectMethod == NULL ||
	    autoreleaseMethod == NULL)
		return;

	class_replaceMethod(object_getClass(NSAutoreleasePool),
	    @selector(alloc), (IMP)alloc, method_getTypeEncoding(allocMethod));
	class_replaceMethod(object_getClass(NSAutoreleasePool),
	    @selector(addObject:), (IMP)addObject,
	    method_getTypeEncoding(addObjectMethod));
	class_replaceMethod(NSObject, @selector(autorelease),
	    (IMP)autorelease, method_getTypeEncoding(autoreleaseMethod));
}