ANN: H98 FFI Addendum 1.0, Release Candidate 13

Sven Panne Sven.Panne at informatik.uni-muenchen.de
Fri Oct 31 12:38:05 EST 2003


Alastair Reid wrote:
> [As I was about to send this, it occured to me that maybe you had made a typo 
> and meant to write 'peekByteOff' instead of 'peekElemOff'?  This seems less 
> dodgy since peekByteOff is more usually used to access elements of structs 
> where different elements have different types.]

*aaargl* Of course, sorry for the confusion caused by my typo... I fully
agree with your arguments for {peek,poke}ElemOff, but as you already
mentioned above, the typical scenario for {peek,poke}ByteOff is access to
structs, so the more general type is much more useful. It could be argued
that this is a cast via the backdoor, but that would hold for {plus,minus}Ptr,
too.

Cheers,
    S.





More information about the FFI mailing list