Browse Source

The ffi_closure_alloc return fCode is real do

Jinyang He 1 year ago
parent
commit
8032b65442
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/libffi/src/ffi.manager.pp

+ 1 - 1
packages/libffi/src/ffi.manager.pp

@@ -796,7 +796,7 @@ end;
 
 
 function TFFIFunctionCallback.GetCodeAddress: CodePointer;
 function TFFIFunctionCallback.GetCodeAddress: CodePointer;
 begin
 begin
-  Result := fData;
+  Result := fCode;
 end;
 end;
 
 
 constructor TFFIFunctionCallback.Create(aContext: Pointer; aCallConv: TCallConv; constref aArgs: array of TFunctionCallParameterInfo; aResultType: PTypeInfo; aFlags: TFunctionCallFlags);
 constructor TFFIFunctionCallback.Create(aContext: Pointer; aCallConv: TCallConv; constref aArgs: array of TFunctionCallParameterInfo; aResultType: PTypeInfo; aFlags: TFunctionCallFlags);