Re: Core data accessors for structs
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