remobjects / pascalscript

pascalscript
Other
447 stars 178 forks source link

Incorrect IPointer type definition #233

Closed zedxxx closed 3 years ago

zedxxx commented 4 years ago

Now it defined as:

  {$IFDEF VER140UP}
    IPointer = NativeInt;
  {$ELSE}
    {$IFDEF CPUX64}
    IPointer = IntPtr;
    {$ELSE}
    {$IFDEF CPU64} IPointer = LongWord;{$ELSE}  IPointer = Cardinal;{$ENDIF}{$ENDIF}
  {$ENDIF}

and there are two problems:

[dcc32 Warning] uPSUtils.pas(786): W1024 Combining signed and unsigned types - widened both operands

Possible fix:

{$IFDEF DELPHI2009UP}
IPointer = NativeUInt;
{$ELSE}
IPointer = Cardinal;
{$ENDIF}
Vizit0r commented 2 years ago

x64 and NativeUInt coming on from XE2 version, not 2009. But in common thats correct.

Will update it.