Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2010-11

Two issues with variant type definitions

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Sergei Gorelkin

Hello,

Two questions I wanted to ask:

1) There are two variant type defintions (varxxx constants): one in compiler/symdef.pas, another one in rtl/inc/varianth.inc. Worse, they are out of sync. Is it really necessary to have a separate set of these definitions in compiler?

2) In FPC, varunicodestr=22 (in symdef.pas), while Delphi defines varUString=$102. Although meaning of these types are a bit different in FPC and Delphi, probably we should change varunicodestr in range > 256, because values below 256 are used for types that are known to COM. Are there objections/opinions on doing so?

Regards,
Sergei

Reply by email

Florian Klaempfl
to Sergei Gorelkin
Sergei Gorelkin wrote 8 lines
Hello, Two questions I wanted to ask: 1) There are two variant type defintions (varxxx constants): one in compiler/symdef.pas, another one in rtl/inc/varianth.inc. Worse, they are out of sync. Is it really necessary to have a separate set of these definitions in compiler?

Previously we always decided to keep two separate files, see e.g. fpcinnr.inc and innr.inc, so I'd prefer just to update the compiler one.

Show quoted text 6 lines
2) In FPC, varunicodestr=22 (in symdef.pas), while Delphi defines varUString=$102. Although meaning of these types are a bit different in FPC and Delphi, probably we should change varunicodestr in range > 256, because values below 256 are used for types that are known to COM. Are there objections/opinions on doing so?

No.

Reply by email

Sergei Gorelkin
to Florian Klaempfl

Florian Klaempfl пишет:

Show quoted text 13 lines
Am 11.11.2010 15:19, schrieb Sergei Gorelkin: > Hello, > > Two questions I wanted to ask: > > 1) There are two variant type defintions (varxxx constants): one in > compiler/symdef.pas, another one in rtl/inc/varianth.inc. Worse, they > are out of sync. Is it really necessary to have a separate set of these > definitions in compiler? Previously we always decided to keep two separate files, see e.g. fpcinnr.inc and innr.inc, so I'd prefer just to update the compiler one.

Ok, I'll then add comments reminding to update another copy in sync.

Sergei

Reply by email