[fpc-devel] Component FTag and Tag should be int64

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Mon Nov 22 17:48:29 CET 2010



On Mon, 22 Nov 2010, Hans-Peter Diettrich wrote:

> michael.vancanneyt at wisa.be schrieb:
>
>>> I was looking at the code for Tag property in classes unit and noticed I 
>>> can't safely use Tag to keep runtime pointers (at least on a 64 bit 
>>> compile). What is the likelihood of getting tags changed to support 
>>> universal access under 64/32 bit compiles?
>>> 
>>> What is the logic behind the shortfall? I suspect just legacy and it could 
>>> be easily fixed. _______________________________________________
>> 
>> The logic is that it is bad programming to use an integer to store a 
>> pointer.
>
> That's why handles are used for that purpose, and on a 64 bit system handles 
> can have 64 bits as well.

Handles are equally bad. They are *not* pointers.

You should store a pointer in a variable of pointer type, period.

Michael.



More information about the fpc-devel mailing list