• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSData from dispatch_data_t?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSData from dispatch_data_t? (From: Carl Hoefs <email@hidden>)
 >Re: NSData from dispatch_data_t? (From: Ryan Dignard <email@hidden>)
 >Re: NSData from dispatch_data_t? (From: Carl Hoefs <email@hidden>)

  • Prev by Date: Re: NSData from dispatch_data_t?
  • Next by Date: Re: NSData from dispatch_data_t?
  • Previous by thread: Re: NSData from dispatch_data_t?
  • Next by thread: Re: NSData from dispatch_data_t?
  • Index(es):
    • Date
    • Thread