Skip to content

https://bugs.swift.org/browse/SR-6812 #1557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions CoreFoundation/Base.subproj/CFRuntime.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,23 +195,31 @@ typedef struct __CFRuntimeBase {
uintptr_t _cfisa;
uintptr_t _swift_rc;
// This is for CF's use, and must match _NSCFType layout
#if defined(__LP64__) || defined(__LLP64__)
_Atomic(uint64_t) _cfinfoa;
#else
_Atomic(uint32_t) _cfinfoa;
#endif
} CFRuntimeBase;

#if defined(__LP64__) || defined(__LLP64__)
#define INIT_CFRUNTIME_BASE(...) {0, _CF_CONSTANT_OBJECT_STRONG_RC, 0x0000000000000080ULL}
#else
#define INIT_CFRUNTIME_BASE(...) {0, _CF_CONSTANT_OBJECT_STRONG_RC, 0x00000080UL}
#endif

#else

typedef struct __CFRuntimeBase {
uintptr_t _cfisa;
#if __LP64__
#if defined(__LP64__) || defined(__LLP64__)
_Atomic(uint64_t) _cfinfoa;
#else
_Atomic(uint32_t) _cfinfoa;
#endif
} CFRuntimeBase;

#if __LP64__
#if defined(__LP64__) || defined(__LLP64__)
#define INIT_CFRUNTIME_BASE(...) {0, 0x0000000000000080ULL}
#else
#define INIT_CFRUNTIME_BASE(...) {0, 0x00000080UL}
Expand Down
4 changes: 4 additions & 0 deletions CoreFoundation/String.subproj/CFString.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@ struct __CFConstStr {
struct {
uintptr_t _cfisa;
uintptr_t _swift_rc;
#if defined(__LP64__) || defined(__LLP64__)
uint64_t _cfinfoa;
#else
uint32_t _cfinfoa;
#endif
} _base;
uint8_t *_ptr;
#if defined(__LP64__) && defined(__BIG_ENDIAN__)
Expand Down