[fpc-pascal]More strangeness...

Peter Vreman peter at freepascal.org
Fri Aug 29 16:39:50 CEST 2003


>
>> Yep, I took a look at the windows unit last night, found the bulk of
>> type
>> declarations were in BASE.INC and noticed, almost right away, that
> "Handle" a
>> 32 bit unsigned value is declared as a longint. Shouldn't it be a
> LongWord? A
>> longint has only half as many positive values as a longword and a
>> high-numbered handle could be causing the range checking error.
>
> THandle = DWORD = LondWord = Cardinal in 32bit ObjectPascal
>
> Integer is completely wrong.

In the development branch THandle is a Cardinal. In the stable 1.0.x
branch we left it an Longint. In the past there were some issues in the
with Cardinal. At that moment it was decided to leave thandle at longint.
And it has been already a longint for 5 years. When it was really a
problem then it would have been noticed much earlier.

Peter





More information about the fpc-pascal mailing list