On Tue, 2004-02-03 at 00:58, Leopold Toetsch wrote:

> Have a look at the third initializer param - this is the offset of the
> item in bytes.

Oh, right.  That completely slipped my mind.

> (Albeit untested - seems you got the code to test it :)

Okay, I'll turn this into a test case.

> NCI is per se unportable. But the *Struct PMC could of course be smarter
> and calculate common align requirements. There are of course still
> issues if you have to deal with packed structures.

Someone here mentioned that it's trivial to detect struct alignments in
C.  If the configuration doesn't already do that, make it do that, then
add a bit of code to the struct PMC to align the element correctly?

        set layout['member'], .DATATYPE_INT
        push layout, 0
        push layout, 0
        set layout['alignedmember'], .DATATYPE_UINT16
        push layout, 0
        push layout, 'align'

Maybe that's not the right interface, but I'd like something nearly that
simple.

Is this one for the TODO list, or did I catch a pumpking in good
humours?

-- c

Reply via email to