mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 13:59:28 +02:00
+ added is_farpointer(tdef) and is_hugepointer(tdef) helper functions to defutil
git-svn-id: trunk@24865 -
This commit is contained in:
parent
aae318403d
commit
894d400a7b
@ -328,6 +328,14 @@ interface
|
||||
{ returns true of def is a methodpointer }
|
||||
function is_methodpointer(def : tdef) : boolean;
|
||||
|
||||
{$ifdef i8086}
|
||||
{# Returns true if p is a far pointer def }
|
||||
function is_farpointer(p : tdef) : boolean;
|
||||
|
||||
{# Returns true if p is a huge pointer def }
|
||||
function is_hugepointer(p : tdef) : boolean;
|
||||
{$endif i8086}
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
@ -1429,4 +1437,18 @@ implementation
|
||||
result:=(def.typ=procvardef) and (po_methodpointer in tprocvardef(def).procoptions);
|
||||
end;
|
||||
|
||||
{$ifdef i8086}
|
||||
{ true if p is a far pointer def }
|
||||
function is_farpointer(p : tdef) : boolean;
|
||||
begin
|
||||
result:=(p.typ=pointerdef) and (tpointerdef(p).x86pointertyp=x86pt_far);
|
||||
end;
|
||||
|
||||
{ true if p is a huge pointer def }
|
||||
function is_hugepointer(p : tdef) : boolean;
|
||||
begin
|
||||
result:=(p.typ=pointerdef) and (tpointerdef(p).x86pointertyp=x86pt_huge);
|
||||
end;
|
||||
{$endif i8086}
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user