Add +[NSObject _TrivialAllocInit] to enable fast-path alloc / init methods with libobjc2 2.2

This commit is contained in:
Frederik Seiffert 2024-02-06 10:39:36 +01:00 committed by Frederik Seiffert
parent dc688a1586
commit ec8a7a3e97
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2024-04-15 Frederik Seiffert <frederik@algoriddim.com>
* Source/NSObject.m: add +[NSObject _TrivialAllocInit] to enable
fast-path alloc / init methods with libobjc2 2.2.
2024-04-02 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSURLSession.m: fix for #385

View file

@ -949,8 +949,9 @@ NSShouldRetainWithZone (NSObject *anObject, NSZone *requestedZone)
* </p>
*/
@implementation NSObject
#if defined(GS_ARC_COMPATIBLE)
- (void)_ARCCompliantRetainRelease {}
#ifdef OBJC_CAP_ARC
+ (void) _TrivialAllocInit {}
- (void) _ARCCompliantRetainRelease {}
#endif
/**