From 28006018ac45f76deb5dbc9dbcf5eda82a0d2acf Mon Sep 17 00:00:00 2001 From: Sven Barth Date: Wed, 1 Dec 2021 23:36:27 +0100 Subject: [PATCH] * use the already existing TNative(U)IntNibbleIndex types for the TORDINALNIBBLEINDEX macro as this way memory models with far pointers (where Native(U)Int has a size of 4) is handled correctly as well (cherry picked from commit 5412e463ff4cd18ab53b99f71510467485d64be2) --- packages/rtl-objpas/src/inc/syshelpers.pp | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/packages/rtl-objpas/src/inc/syshelpers.pp b/packages/rtl-objpas/src/inc/syshelpers.pp index e3240db49c..4e62f2b61c 100644 --- a/packages/rtl-objpas/src/inc/syshelpers.pp +++ b/packages/rtl-objpas/src/inc/syshelpers.pp @@ -329,15 +329,7 @@ end; {$define TORDINALHELPER:=TNativeIntSysHelper} {$define TORDINALBITINDEX:=TNativeIntBitIndex} -{$ifdef cpu16} - {$define TORDINALNIBBLEINDEX:=TSmallIntNibbleIndex} -{$endif} -{$ifdef cpu32} - {$define TORDINALNIBBLEINDEX:=TIntegerNibbleIndex} -{$endif} -{$ifdef cpu64} - {$define TORDINALNIBBLEINDEX:=TInt64NibbleIndex} -{$endif} +{$define TORDINALNIBBLEINDEX:=TNativeIntNibbleIndex} {$i syshelperso.inc} { --------------------------------------------------------------------- @@ -346,15 +338,7 @@ end; {$define TORDINALHELPER:=TNativeUIntSysHelper} {$define TORDINALBITINDEX:=TNativeUIntBitIndex} -{$ifdef cpu16} - {$define TORDINALNIBBLEINDEX:=TWordNibbleIndex} -{$endif} -{$ifdef cpu32} - {$define TORDINALNIBBLEINDEX:=TDwordNibbleIndex} -{$endif} -{$ifdef cpu64} - {$define TORDINALNIBBLEINDEX:=TQwordNibbleIndex} -{$endif} +{$define TORDINALNIBBLEINDEX:=TNativeUIntNibbleIndex} {$i syshelperso.inc} { ---------------------------------------------------------------------