Skip to content

Fix compiler error in CoreFoundation when building in C++ mode #5081

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 1 commit into from
Sep 3, 2024
Merged
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
5 changes: 5 additions & 0 deletions Sources/CoreFoundation/include/ForFoundationOnly.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ CF_IMPLICIT_BRIDGING_DISABLED
#include <mach/mach_time.h>
#endif

_CF_EXPORT_SCOPE_BEGIN

#if __BLOCKS__
/* These functions implement standard error handling for reallocation. Their parameters match their unsafe variants (realloc/CFAllocatorReallocate). They differ from reallocf as they provide a chance for you to clean up a buffers contents (in addition to freeing the buffer, etc.)

Expand All @@ -69,10 +71,13 @@ CF_EXPORT void *_Nonnull __CFSafelyReallocateWithAllocator(CFAllocatorRef _Nulla
#endif

Boolean __CFAllocatorRespectsHintZeroWhenAllocating(CFAllocatorRef _Nullable allocator);

typedef CF_ENUM(CFOptionFlags, _CFAllocatorHint) {
_CFAllocatorHintZeroWhenAllocating = 1
};

_CF_EXPORT_SCOPE_END

#define NSISARGTYPE void * _Nullable

#pragma mark - CFBundle
Expand Down