[Lazarus] [fpc-devel] win64 dwarf patch

And3mD and3md at gmail.com
Sat Oct 16 14:32:12 CEST 2010


OK, I understand. The terrible thing is that I saw using Tag as Pointer in  
some delphi books.

That's implicate a lot of code with Tag as pointers. Maybe adding non  
streamed TagPtr:PtrInt will be the best compromise?

Andrzej Kilijański


Dnia 16-10-2010 o 12:57:44 Michael Van Canneyt <michael at freepascal.org>  
napisał(a):

>
>
> On Sat, 16 Oct 2010, Hans-Peter Diettrich wrote:
>
>> And3mD schrieb:
>>> I added bug report about using Tag as Pointers in IDE
>>>  http://bugs.freepascal.org/view.php?id=17642
>>
>> For some reason (read-only???) I could not add a note there, so I'll  
>> present my ideas here:
>>
>> IMO Tag should become an int64 for all components, to overcome platform  
>> and streaming problems. More properties can be introduced, for best  
>> compatibility with existing code (Tag64, TagPtr). These properties  
>> could be based on the same int64 field, i.e. r/w part of it, and only  
>> that field is streamed. And when we just are extending the type, we  
>> also could consider to make it big enough to hold a method reference...
>
> Using tag as a pointer is plain wrong coding, so this change will not  
> make it.
>
> Moreover, streaming it is pure nonsense: There is no guarantee that your  
> pointer
> will point to the same object, or indeed whether it will exist at all  
> when the program is run.
>
> The IDE code is simply wrong, and should be fixed properly by creating a  
> TMenuItem descendent that contains a reference to the notebook page, and  
> use that class when constructing the menu.
>
> Michael.
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




More information about the Lazarus mailing list