|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
|Well, I figured out what I was doing wrong. The different alignment/pack rules were buried in the "Function Calling Conventions," but that document explained both the ppc and intel ABIs' alignment styles well. It turns out that NSSizeAndAlignment returns the natural alignment for a type, not the power alignment which is the default for structs (I put in a clarification request for the docs). What I said about including align/pack data in @encodes still goes, though there may have to be a more complicated encoding for it. I think it would work if the first digit in the structure name contained an alignment code and the following digits contained a pack value. That way packed structures could be passed around not only to my libraries but to NSValue and friends, which would be much more intuitive than having it mysteriously fail (sometimes) with serialization/de-serialization of improperly aligned structs.|
Now I have to figure out bitfields :)
Description: This is a digitally signed message part
_______________________________________________ Do not post admin requests to the list. They will be ignored. Objc-language mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.