mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-10 18:06:28 +02:00
+ add function to check whether a def is an invokable function reference
This commit is contained in:
parent
b28495a423
commit
122c6c92cb
@ -382,6 +382,9 @@ interface
|
||||
{ returns true of def is a methodpointer }
|
||||
function is_methodpointer(def : tdef) : boolean;
|
||||
|
||||
{ returns true if def is a function reference }
|
||||
function is_funcref(def:tdef):boolean;
|
||||
|
||||
{ returns true if def is a C "block" }
|
||||
function is_block(def: tdef): boolean;
|
||||
|
||||
@ -1894,6 +1897,12 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
function is_funcref(def:tdef):boolean;
|
||||
begin
|
||||
result:=(def.typ=objectdef) and (oo_is_funcref in tobjectdef(def).objectoptions);
|
||||
end;
|
||||
|
||||
|
||||
function is_block(def: tdef): boolean;
|
||||
begin
|
||||
result:=(def.typ=procvardef) and (po_is_block in tprocvardef(def).procoptions)
|
||||
|
Loading…
Reference in New Issue
Block a user