[fpc-devel] Delphi incompatibly regarding PtrInt and NativeInt

Graeme Geldenhuys graemeg.lists at gmail.com
Fri Oct 7 15:39:33 CEST 2011


Hi,

I got an email from a Delphi XE2 user busy working on a 64-bit patch for
tiOPF3. A few things he noted, which I see is different to how FPC done it.

Under 64-bit FPC we have the following:

  PtrInt = Int64;

  NativeInt  = PtrInt;



But apparently under 64-bit Delphi XE2

  PtrInt = Integer;        // Integer always being 32-bit, so is the
                           // pointer then

  NativeInt = Int64;



I don't have a copy of Delphi XE2 available, so can't test this myself.
Just thought I would mention it in case anybody here can collaborate.

I did find this XE2 documentation though.

  http://docwiki.embarcadero.com/VCL/en/System.NativeInt


If this is all correct, the changes apply to both FPC 2.6.0 (upcoming
release) and FPC 2.7.1 (trunk) for FPC to stay compatible with Delphi.


Then again, changing PtrInt to meant 32-bit size in FPC would break a
crap load of code that was recently changes. But such is life if you
create a clone compiler.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/




More information about the fpc-devel mailing list