File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
test/stdlib/Inputs/NSSlowTaggedLocalizedString Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 22#import " NSSlowTaggedLocalizedString.h"
33#import < dlfcn.h>
44#import < objc/runtime.h>
5+ #import < Foundation/Foundation.h>
56
6- // If and when CF starts linking Swift we may need to rethink this
7- #import < CoreFoundation/CoreFoundation.h>
7+ /*
8+ This horrific mess is simulating the new-in-macOS-Ventura tagged pointer strings,
9+ which can have lengths >15 characters, which can cause problems in SmallString,
10+ which used to assume that would never happen. Once CI is running on Ventura or
11+ later, this can be rewritten to use a regular NSLocalizedString.
12+ */
813
914@implementation NSSlowTaggedLocalizedString
1015
11- typedef struct _NSRange {
12- uint64_t location;
13- uint64_t length;
14- } NSRange ;
15-
1616+ (instancetype ) createTestString {
1717#if __LP64__
1818 static dispatch_once_t onceToken;
1919 dispatch_once (&onceToken, ^{
20+ [[[NSString alloc ] init ] release ]; // Make sure NSString is initialized
2021 Class tagClass = objc_lookUpClass (" NSTaggedPointerString" );
2122 Class ourClass = [NSSlowTaggedLocalizedString class ];
2223
You can’t perform that action at this time.
0 commit comments