[fpc-devel] Propose: change TComponent.Tag from longint to PtrInt
Mattias Gaertner
nc-gaertnma at netcologne.de
Mon Sep 4 19:21:23 CEST 2006
On Mon, 04 Sep 2006 13:16:11 +0200
Vincent Snijders <vsnijders at quicknet.nl> wrote:
> Daniël Mantione schreef:
> >
> > Op Mon, 4 Sep 2006, schreef Vincent Snijders:
> >
> >> Daniël Mantione schreef:
> >>> Op Mon, 4 Sep 2006, schreef Mattias Gaertner:
> >>>
> >>>> Me2.
> >>>>
> >>>> 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.
> >>> ...which makes it impossible to use streams for anything derived
> >>> from Tcomponent, which is really a lot. I don't think we should
> >>> break this feature to allow broken code to work.
> >> Really a lot? Can you give examples where numbers > maxint are
> >> streamed?
> >
> > Even if you stream a zero it breaks.
> >
>
> Then Lazarus uses an advanced streaming mechanism, which looks at the
> size of the value and decides to 1, 2, 4 or 8 bytes for an int64,
> when streaming a form.
>
> I thought this was more or less standard behaviour.
It is.
Mattias
More information about the fpc-devel
mailing list