[fpc-devel] Propose: change TComponent.Tag from longint to PtrInt
nc-gaertnma at netcologne.de
Mon Sep 4 10:39:38 CEST 2006
On Mon, 4 Sep 2006 07:13:53 +0200
Martin Schreiber <fpmse at bluewin.ch> wrote:
> On Monday 04 September 2006 02.55, Luiz Americo wrote:
> > I'd like to propose change TComponent.Tag type from longint to
> > PtrInt. I know it's not a good programing practice, but sometimes
> > this property can be used to hold pointers.
> > In 32bit there's not many problems since pointer and longint have
> > the same size, but the thing changes in 64 bit.
> > The choice of PtrInt has the benefit of not modifying nothing in
> > 32bit, while in 64bit you getting a integer of the same size of
> > pointers.
> > What do you think?
Just one disadvantage:
The Tag is published.
If someone stores a 64bit value and the component is stored,
the stream can not be read under 32bit anymore.
More information about the fpc-devel