mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 06:09:11 +02:00
* 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:
parent
fb20791cbe
commit
dfa1f3e0a3
@ -338,8 +338,6 @@ Type
|
|||||||
PtrUInt = QWord;
|
PtrUInt = QWord;
|
||||||
ValSInt = int64;
|
ValSInt = int64;
|
||||||
ValUInt = qword;
|
ValUInt = qword;
|
||||||
NativeInt = PtrInt;
|
|
||||||
NativeUint = PtrUint;
|
|
||||||
CodePointer = Pointer;
|
CodePointer = Pointer;
|
||||||
CodePtrInt = PtrInt;
|
CodePtrInt = PtrInt;
|
||||||
CodePtrUInt = PtrUInt;
|
CodePtrUInt = PtrUInt;
|
||||||
@ -352,8 +350,6 @@ Type
|
|||||||
PtrUInt = DWord;
|
PtrUInt = DWord;
|
||||||
ValSInt = Longint;
|
ValSInt = Longint;
|
||||||
ValUInt = Cardinal;
|
ValUInt = Cardinal;
|
||||||
NativeInt = PtrInt;
|
|
||||||
NativeUint = PtrUint;
|
|
||||||
CodePointer = Pointer;
|
CodePointer = Pointer;
|
||||||
CodePtrInt = PtrInt;
|
CodePtrInt = PtrInt;
|
||||||
CodePtrUInt = PtrUInt;
|
CodePtrUInt = PtrUInt;
|
||||||
@ -384,10 +380,18 @@ Type
|
|||||||
{$endif}
|
{$endif}
|
||||||
ValSInt = Integer;
|
ValSInt = Integer;
|
||||||
ValUInt = Word;
|
ValUInt = Word;
|
||||||
NativeInt = Integer;
|
|
||||||
NativeUint = Word;
|
|
||||||
{$endif CPU16}
|
{$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;
|
Int8 = ShortInt;
|
||||||
Int16 = SmallInt;
|
Int16 = SmallInt;
|
||||||
Int32 = Longint;
|
Int32 = Longint;
|
||||||
|
Loading…
Reference in New Issue
Block a user