> On Oct 30, 2018, at 7:48 PM, Carl Hoefs <newsli...@autonomy.caltech.edu> 
> wrote:
> 
> It's ugly, but it compiles:
> 
>    [NSData dataWithBytes:(__bridge const void * _Nullable)(data_t) 
> length:dispatch_data_get_size(data_t)];

This is incorrect: it creates an NSData object whose contents are the 
dispatch_data_t object header. That is not going to match the dispatch_data_t's 
actual contents.


-- 
Greg Parker     gpar...@apple.com <mailto:gpar...@apple.com>     Runtime 
Wrangler


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to