On 06/06/2010 04:56 AM, Holger Hans Peter Freyther wrote:
On 06/06/2010 10:48 AM, Holger Hans Peter Freyther wrote:
2.) The structs I showed are all packed and should not follow the
alignment rules...
This also creates the need for the #value selector to deal with
unaligned memory access... for architectures that need it.
Apart from this, the packed struct class would simply be
^L
CCompound subclass: CPackedStruct [
<shape: #word>
<category: 'Language-C interface'>
<comment: nil>
CPackedStruct class >> declaration: array [
"Compile methods that implement the declaration in array."
<category: 'subclass creation'>
self
declaration: array
inject: self superclass sizeof
into: [:oldOffset :alignment | oldOffset]
]
]
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk