Skip to content
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

Restore android workaround for CONST_STRING_DECL #954

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions CoreFoundation/Base.subproj/CFInternal.h
Expand Up @@ -334,6 +334,16 @@ CF_PRIVATE Boolean __CFProcessIsRestricted();
#define STACK_BUFFER_DECL(T, N, C) T N[C]
#endif

#ifdef __ANDROID__
// Avoids crashes on Android
// https://bugs.swift.org/browse/SR-2587
// https://bugs.swift.org/browse/SR-2588
// Seemed to be a linker/relocation? problem.
// CFStrings using CONST_STRING_DECL() were not working
// Applies reference to _NSCFConstantString's isa here
// rather than using a linker option to create an alias.
#define __CFConstantStringClassReference _TMC10Foundation19_NSCFConstantString
#endif

CF_EXPORT void * __CFConstantStringClassReferencePtr;

Expand Down