[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gambas-bugtracker] Bug #3143: Structure size calculations seem off , varptr to structure do not return a pointer to data area
[Thread Prev] | [Thread Next]
- Subject: [Gambas-bugtracker] Bug #3143: Structure size calculations seem off , varptr to structure do not return a pointer to data area
- From: <bugtracker@xxxxxxxxxxxxxx>
- Date: Wed, 18 Feb 2026 22:19:25 GMT
- To: brian@xxxxxxxxxxxxxxxx,bugtracker@xxxxxxxxxxxxxxxxxxxxxx
http://gambaswiki.org/bugtracker/edit?object=BUG.3143&from=L21haW4- Comment #1 by Benoît MINISINI: Structures are not packed. Each member of a structure is aligned in memory to an address that is a multiple of its size, possibly creating holes in the structure. VarPtr() works only on variables, and return a pointer that points at the value of the variable. So if the variable is an object or a structure, you get a pointer that points at an address that contains a pointer that points at the object address, which is not necessarily the address of the beginning of the data contained in the object or the structure. For me everything returned by your code is what it should be. ----[ Gambas bugtracker-list is hosted by https://www.hostsharing.net ]----
| [Gambas-bugtracker] Bug #3143: Structure size calculations seem off , varptr to structure do not return a pointer to data area | <bugtracker@xxxxxxxxxxxxxx> |