mirror of
https://github.com/moparisthebest/Simba
synced 2024-12-22 15:28:50 -05:00
Fixed bug in Constructors for PS.
This commit is contained in:
parent
b6f2d14ca2
commit
07aca712a6
@ -46,7 +46,7 @@ uses
|
||||
CastaliaSimplePasPar, v_AutoCompleteForm, PSDump;
|
||||
|
||||
const
|
||||
SimbaVersion = 656;
|
||||
SimbaVersion = 660;
|
||||
|
||||
type
|
||||
|
||||
|
@ -10208,7 +10208,7 @@ begin
|
||||
v := NewPPSVariantIFC(Stack[CurrStack + 1], True);
|
||||
end else v := nil;
|
||||
try
|
||||
Result := Caller.InnerfuseCall(FSelf, VirtualClassMethodPtrToPtr(p.Ext1, FSelf), cc, MyList, v);
|
||||
Result := Caller.InnerfuseCall(FSelf, VirtualClassMethodPtrToPtr(p.Ext1, FSelf), TPSCallingConvention(Integer(cc) or 128), MyList, v);
|
||||
finally
|
||||
DisposePPSVariantIFC(v);
|
||||
DisposePPSVariantIFCList(mylist);
|
||||
|
@ -252,7 +252,7 @@ var
|
||||
CallData: TPSList;
|
||||
pp: ^Byte;
|
||||
{$IFDEF FPC}
|
||||
IsConstructor: Boolean;
|
||||
IsConstructor,IsVirtualCons: Boolean;
|
||||
{$ENDIF}
|
||||
|
||||
EAX, EDX, ECX: Longint;
|
||||
@ -503,6 +503,18 @@ var
|
||||
Result := True;
|
||||
end;
|
||||
begin
|
||||
if (Integer(CallingConv) and 128) <> 0 then
|
||||
begin
|
||||
{$ifdef FPC}
|
||||
IsVirtualCons := true;
|
||||
{$endif}
|
||||
CAllingConv := TPSCallingConvention(Integer(CallingConv) and not 128);
|
||||
end else
|
||||
begin
|
||||
{$ifdef FPC}
|
||||
IsVirtualCons:= false
|
||||
{$endif}
|
||||
end;
|
||||
if (Integer(CallingConv) and 64) <> 0 then begin
|
||||
{$IFDEF FPC}
|
||||
IsConstructor := true;
|
||||
@ -575,11 +587,12 @@ begin
|
||||
btClass :
|
||||
begin
|
||||
{$IFDEF FPC}
|
||||
if IsConstructor then
|
||||
if IsConstructor or IsVirtualCons then
|
||||
tbtu32(res.dta^) := RealCall_Register(Address, EDX, EAX, ECX,
|
||||
@Stack[Length(Stack) - 3], Length(Stack) div 4, 4, nil)
|
||||
else
|
||||
{$ENDIF}
|
||||
// {$ELSE}
|
||||
tbtu32(res.dta^) := RealCall_Register(Address, EAX, EDX, ECX,
|
||||
@Stack[Length(Stack) - 3], Length(Stack) div 4, 4, nil);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user