mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 09:09:09 +02:00
* fixed test tchlp24 for i8086 medium/compact memory models
git-svn-id: trunk@25818 -
This commit is contained in:
parent
ef51c8c5a2
commit
1795368cff
@ -8,6 +8,9 @@ program tchlp24;
|
|||||||
{$apptype console}
|
{$apptype console}
|
||||||
|
|
||||||
type
|
type
|
||||||
|
{$ifndef fpc}
|
||||||
|
CodePointer = Pointer;
|
||||||
|
{$endif}
|
||||||
{$M+}
|
{$M+}
|
||||||
TTest = class
|
TTest = class
|
||||||
end;
|
end;
|
||||||
@ -27,12 +30,12 @@ end;
|
|||||||
|
|
||||||
var
|
var
|
||||||
f: TTest;
|
f: TTest;
|
||||||
res: Pointer;
|
res: CodePointer;
|
||||||
begin
|
begin
|
||||||
f := TTest.Create;
|
f := TTest.Create;
|
||||||
res := f.MethodAddress('Test');
|
res := f.MethodAddress('Test');
|
||||||
{$ifdef fpc}
|
{$ifdef fpc}
|
||||||
Writeln('Address of TTest.Test: ', PtrInt(res));
|
Writeln('Address of TTest.Test: ', CodePtrInt(res));
|
||||||
{$else}
|
{$else}
|
||||||
Writeln('Address of TTest.Test: ', NativeInt(res));
|
Writeln('Address of TTest.Test: ', NativeInt(res));
|
||||||
{$endif}
|
{$endif}
|
||||||
|
Loading…
Reference in New Issue
Block a user