Re: NSData from dispatch_data_t?
Re: NSData from dispatch_data_t?
- Subject: Re: NSData from dispatch_data_t?
- From: Greg Parker <email@hidden>
- Date: Tue, 30 Oct 2018 19:51:19 -0700
> On Oct 30, 2018, at 7:48 PM, Carl Hoefs <email@hidden>
> 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 email@hidden <mailto:email@hidden> Runtime
Wrangler
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden