You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I may have missed it but bit fields aren't handled, right?
So bitfields are actually easy to handle with
(int * int * base) bitfield
where the two ints are the left shift count and the mask length and the
base is the underlying integer. This put the onus on the programmer
to calculate the offset for their platform.
The text was updated successfully, but these errors were encountered:
Let me flesh that out .. the client has to first define an ordinary integer in a structure containing the bit fields, and give it a dummy name.
Then a bit field specification can be given for that field, giving the offset and length.
So the "base" above actually has to be the "name" of the field, that specified the type already (and the structure it is a member of). Access is then by load shift mask. Writing is a bit tricker, load, mask, mask input, shift input, or, store. You would need on pair of routines for every base type (int, uint32, etc) which might be handled polymorphically.
I think the client programmer can write these routines anyhow. So maybe it isn't necessary in Ctypes after all.
I may have missed it but bit fields aren't handled, right?
So bitfields are actually easy to handle with
where the two ints are the left shift count and the mask length and the
base is the underlying integer. This put the onus on the programmer
to calculate the offset for their platform.
The text was updated successfully, but these errors were encountered: