Issue 104: FPC ~ >=2.4.0 function calling convention incompatibility in new FPC versions for external functions
git-svn-id: http://code.remobjects.com/svn/pascalscript@209 5c9d2617-0215-0410-a2ee-e80e04d1c6d8
This commit is contained in:
parent
c9a24523c1
commit
a47fb1ac94
@ -9,6 +9,7 @@
|
||||
{$UNDEF PS_FPCSTRINGWORKAROUND}
|
||||
{$DEFINE PS_RESBEFOREPARAMETERS}
|
||||
{$DEFINE x64_string_result_as_varparameter}
|
||||
{$DEFINE PS_RESULTFIRST}
|
||||
{FreePascal 2.3.1 and above has much Delphi compatibility bugs fixed}
|
||||
{$else}
|
||||
{$DEFINE FPC_OLD_FIX}
|
||||
|
@ -541,12 +541,12 @@ begin
|
||||
RegUsage := 1;
|
||||
EAX := Longint(_Self);
|
||||
end;
|
||||
|
||||
{$IFNDEF PS_RESULTFIRST}
|
||||
for I := 0 to Params.Count - 1 do
|
||||
begin
|
||||
if not GetPtr(rp(Params[I])) then Exit;
|
||||
end;
|
||||
|
||||
{$ENDIF}
|
||||
if assigned(res) then begin
|
||||
case res^.aType.BaseType of
|
||||
{$IFNDEF PS_NOWIDESTRING}btWideString, btUnicodeString, {$ENDIF}
|
||||
@ -556,6 +556,12 @@ begin
|
||||
if TPSTypeRec_Set(res.aType).aByteSize >4 then GetPtr(res);
|
||||
end;
|
||||
end;
|
||||
{$IFDEF PS_RESULTFIRST}
|
||||
for I := 0 to Params.Count - 1 do
|
||||
begin
|
||||
if not GetPtr(rp(Params[I])) then Exit;
|
||||
end;
|
||||
{$ENDIF}
|
||||
case res^.aType.BaseType of
|
||||
btSet:
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user