FFI bug? (was Passing a char[] inside a struct to an FFI call)
C. David Shaffer
cdshaffer at acm.org
Sun Dec 12 02:10:56 UTC 2004
Andreas Raab wrote:
>> Is there a bug in the FFI field definition code which ignores the
>> field size parameter?
>
>
> The field size is exclusively used for padding, and no it isn't
> ignored. Try a spec like:
>
> fields
> "self defineFields"
> ^#(
> (someNumber 'long')
> (someString 'byte' 255)
> (anotherLong 'long')
> )
>
> and check the accessors for anotherLong.
So I should manually copy the bytes of my string into the
ExternalStructure and ignore the mutator that is generated?
David
More information about the Squeak-dev
mailing list
|