[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Map C bit-field to Gambas datatype
[Thread Prev] | [Thread Next]
- Subject: Re: Map C bit-field to Gambas datatype
- From: Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx>
- Date: Thu, 14 Mar 2024 23:13:13 +0200
- To: user@xxxxxxxxxxxxxxxxxxxxxx
> > So then, for this structure [ > https://mongoose.ws/documentation/#struct-mg_connection] (which would be > received by a Gambas Sub > as an event handler/callback in this example [ > https://mongoose.ws/documentation/tutorials/http-server/#a-minimal-static-server], > > I could simply declare the unsigned integers as Integers or even Bytes? > > Or, should I declare the connection parameter not as a structure but as a > pointer and just pass it along as is, and IF I need to > access it's fields use pointer arithmetic based on the SizeOf the > datatypes? > Arghh.... Looking a bit more into this and it really is implementation specific. IE you cannot trust on how the data is passed in the structure. Surely you could get this work, but it might change depending on the compiler, etc. Not worth it. Jussi
Map C bit-field to Gambas datatype | T Lee Davidson <t.lee.davidson@xxxxxxxxx> |
Re: Map C bit-field to Gambas datatype | Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx> |
Re: Map C bit-field to Gambas datatype | T Lee Davidson <t.lee.davidson@xxxxxxxxx> |