[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: T Lee Davidson <t.lee.davidson@xxxxxxxxx>
- Date: Thu, 14 Mar 2024 16:45:13 -0400
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On 3/14/24 16:12, Jussi Lahtinen wrote:
I suppose for usage in external functions there would be nothing special, just create structure with matching variables. But if you want the memory behaviour in Gambas, then you must implement it by yourself.Jussi
Thank you for the response, Jussi.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?
On Thu, Mar 14, 2024 at 6:38 PM T Lee Davidson <t.lee.davidson@xxxxxxxxx <mailto:t.lee.davidson@xxxxxxxxx>> wrote: As in the subject, is it possible?
-- Lee --- Gambas User List Netiquette [https://gambaswiki.org/wiki/doc/netiquette] ---- --- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] ----
Re: Map C bit-field to Gambas datatype | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
Re: Map C bit-field to Gambas datatype | Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx> |
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> |