Skip to content

Commit 3a3da52

Browse files
authored
Merge pull request #1557 from chnmrc/master
2 parents 2efe08c + 1b52386 commit 3a3da52

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

CoreFoundation/Base.subproj/CFRuntime.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,23 +195,31 @@ 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 defined(__LP64__) || defined(__LLP64__)
198199
_Atomic(uint64_t) _cfinfoa;
200+
#else
201+
_Atomic(uint32_t) _cfinfoa;
202+
#endif
199203
} CFRuntimeBase;
200204

205+
#if defined(__LP64__) || defined(__LLP64__)
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

205213
typedef struct __CFRuntimeBase {
206214
uintptr_t _cfisa;
207-
#if __LP64__
215+
#if defined(__LP64__) || defined(__LLP64__)
208216
_Atomic(uint64_t) _cfinfoa;
209217
#else
210218
_Atomic(uint32_t) _cfinfoa;
211219
#endif
212220
} CFRuntimeBase;
213221

214-
#if __LP64__
222+
#if defined(__LP64__) || defined(__LLP64__)
215223
#define INIT_CFRUNTIME_BASE(...) {0, 0x0000000000000080ULL}
216224
#else
217225
#define INIT_CFRUNTIME_BASE(...) {0, 0x00000080UL}

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__) || defined(__LLP64__)
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)