Skip to content

Commit a3e72a9

Browse files
author
Marco Chini
committed
https://bugs.swift.org/browse/SR-6812
1 parent ce50f22 commit a3e72a9

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CoreFoundation/Base.subproj/CFRuntime.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,18 @@ typedef struct __CFRuntimeBase {
195195
uintptr_t _cfisa;
196196
uintptr_t _swift_rc;
197197
// This is for CF's use, and must match _NSCFType layout
198+
#if __LP64__
198199
_Atomic(uint64_t) _cfinfoa;
200+
#else
201+
_Atomic(uint32_t) _cfinfoa;
202+
#endif
199203
} CFRuntimeBase;
200204

205+
#if __LP64__
201206
#define INIT_CFRUNTIME_BASE(...) {0, _CF_CONSTANT_OBJECT_STRONG_RC, 0x0000000000000080ULL}
207+
#else
208+
#define INIT_CFRUNTIME_BASE(...) {0, _CF_CONSTANT_OBJECT_STRONG_RC, 0x00000080UL}
209+
#endif
202210

203211
#else
204212

CoreFoundation/String.subproj/CFString.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,11 @@ struct __CFConstStr {
156156
struct {
157157
uintptr_t _cfisa;
158158
uintptr_t _swift_rc;
159+
#if defined(__LP64__)
159160
uint64_t _cfinfoa;
161+
#else
162+
uint32_t _cfinfoa;
163+
#endif
160164
} _base;
161165
uint8_t *_ptr;
162166
#if defined(__LP64__) && defined(__BIG_ENDIAN__)

0 commit comments

Comments
 (0)