* NativeInt and NativeUInt redefined as aliases to PtrInt/PtrUInt, so now they

become 32-bit in some i8086 memory models. Added comment explaining why they
  were introduced (delphi compatibility) and why they shouldn't be used in the
  FPC RTL.

git-svn-id: trunk@27238 -
This commit is contained in:
nickysn 2014-03-23 14:06:47 +00:00
parent fb20791cbe
commit dfa1f3e0a3

View File

@ -338,8 +338,6 @@ Type
PtrUInt = QWord;
ValSInt = int64;
ValUInt = qword;
NativeInt = PtrInt;
NativeUint = PtrUint;
CodePointer = Pointer;
CodePtrInt = PtrInt;
CodePtrUInt = PtrUInt;
@ -352,8 +350,6 @@ Type
PtrUInt = DWord;
ValSInt = Longint;
ValUInt = Cardinal;
NativeInt = PtrInt;
NativeUint = PtrUint;
CodePointer = Pointer;
CodePtrInt = PtrInt;
CodePtrUInt = PtrUInt;
@ -384,10 +380,18 @@ Type
{$endif}
ValSInt = Integer;
ValUInt = Word;
NativeInt = Integer;
NativeUint = Word;
{$endif CPU16}
{ NativeInt and NativeUInt are Delphi compatibility types. Even though Delphi
has IntPtr and UIntPtr, the Delphi documentation for NativeInt states that
'The size of NativeInt is equivalent to the size of the pointer on the
current platform'. Because of the misleading names, these types shouldn't be
used in the FPC RTL. Note that on i8086 their size changes between 16-bit
and 32-bit according to the memory model, so they're not really a 'native
int' type there at all. }
NativeInt = PtrInt;
NativeUInt = PtrUInt;
Int8 = ShortInt;
Int16 = SmallInt;
Int32 = Longint;