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

[wasm] Guard out the use of libdispatch types #4905

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion CoreFoundation/Base.subproj/CFInternal.h
Expand Up @@ -1203,12 +1203,13 @@ CF_INLINE dispatch_queue_t __CFDispatchQueueGetGenericBackground(void) {
return dispatch_get_global_queue(QOS_CLASS_UTILITY, DISPATCH_QUEUE_OVERCOMMIT);
}

CF_PRIVATE dispatch_data_t _CFDataCreateDispatchData(CFDataRef data); //avoids copying in most cases

#endif

CF_PRIVATE CFStringRef _CFStringCopyBundleUnloadingProtectedString(CFStringRef str);

CF_PRIVATE uint8_t *_CFDataGetBytePtrNonObjC(CFDataRef data);
CF_PRIVATE dispatch_data_t _CFDataCreateDispatchData(CFDataRef data); //avoids copying in most cases

// Use this for functions that are intended to be breakpoint hooks. If you do not, the compiler may optimize them away.
// Based on: BREAKPOINT_FUNCTION in objc-os.h
Expand Down
6 changes: 5 additions & 1 deletion CoreFoundation/Stream.subproj/CFStream.h
Expand Up @@ -17,7 +17,10 @@
#include <CoreFoundation/CFRunLoop.h>
#include <CoreFoundation/CFSocket.h>
#include <CoreFoundation/CFError.h>

#if __HAS_DISPATCH__
#include <dispatch/dispatch.h>
#endif

CF_IMPLICIT_BRIDGING_ENABLED
CF_EXTERN_C_BEGIN
Expand Down Expand Up @@ -456,7 +459,7 @@ void CFReadStreamUnscheduleFromRunLoop(CFReadStreamRef _Null_unspecified stream,
CF_EXPORT
void CFWriteStreamUnscheduleFromRunLoop(CFWriteStreamRef _Null_unspecified stream, CFRunLoopRef _Null_unspecified runLoop, CFRunLoopMode _Null_unspecified runLoopMode);


#if __HAS_DISPATCH__
/*
* Specify the dispatch queue upon which the client callbacks will be invoked.
* Passing NULL for the queue will prevent future callbacks from being invoked.
Expand All @@ -480,6 +483,7 @@ dispatch_queue_t _Null_unspecified CFReadStreamCopyDispatchQueue(CFReadStreamRef

CF_EXPORT
dispatch_queue_t _Null_unspecified CFWriteStreamCopyDispatchQueue(CFWriteStreamRef _Null_unspecified stream) API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
#endif


/* The following API is deprecated starting in 10.5; please use CFRead/WriteStreamCopyError(), above, instead */
Expand Down