• 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: Core data accessors for structs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core data accessors for structs


  • Subject: Re: Core data accessors for structs
  • From: Jim Correia <email@hidden>
  • Date: Mon, 25 Jun 2007 14:52:54 -0400

On Jun 25, 2007, at 9:38 AM, MH wrote:

Although this seems to work fine. Are there any other issues that I'm
overlooking?

[...]

   NSData *fooAsData = [NSData dataWithBytes:&newFoo
length:sizeof(myStruct)];

If you serialize structures in this way, you won't be able to read them back on a different architecture (little endian vs. big endian, 32 vs. 64 bit, different structure padding rules, etc.)


Jim

_______________________________________________

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: 
 >Core data accessors for structs (From: MH <email@hidden>)

  • Prev by Date: Re: Core data accessors for structs
  • Next by Date: Re: HTTP Uploading
  • Previous by thread: Re: Core data accessors for structs
  • Next by thread: Shared code in multiple plug-ins.
  • Index(es):
    • Date
    • Thread