IDE: utility function GetJITMethod

git-svn-id: trunk@35729 -
This commit is contained in:
mattias 2012-03-05 11:21:19 +00:00
parent 796db06d48
commit 534d860289

View File

@ -273,6 +273,7 @@ type
end;
function IsJITMethod(const aMethod: TMethod): boolean;
function GetJITMethod(const aMethod: TMethod; out aJITMethod: TJITMethod): boolean;
function CompareJITMethod(Data1, Data2: Pointer): integer;
var
@ -657,6 +658,18 @@ begin
{$endif}
end;
function GetJITMethod(const aMethod: TMethod; out aJITMethod: TJITMethod
): boolean;
begin
if IsJITMethod(aMethod) then begin
Result:=true;
aJITMethod:=TJITMethod(aMethod.Data);
end else begin
Result:=false;
aJITMethod:=nil;
end;
end;
function CompareJITMethod(Data1, Data2: Pointer): integer;
var
JITMethod1: TJITMethod absolute Data1;