|
@@ -100,11 +100,16 @@ implementation
|
|
|
if pd.deftype=procdef then
|
|
|
akttokenpos:=tprocdef(pd).fileinfo;
|
|
|
|
|
|
- { For left to right add it at the end to be delphi compatible }
|
|
|
- if pd.proccalloption in pushleftright_pocalls then
|
|
|
- paranr:=paranr_result_leftright
|
|
|
+ if is_interfacecom(tprocdef(pd)._class) then
|
|
|
+ paranr:=paranr_result_com
|
|
|
else
|
|
|
- paranr:=paranr_result;
|
|
|
+ begin
|
|
|
+ { For left to right add it at the end to be delphi compatible }
|
|
|
+ if pd.proccalloption in pushleftright_pocalls then
|
|
|
+ paranr:=paranr_result_leftright
|
|
|
+ else
|
|
|
+ paranr:=paranr_result;
|
|
|
+ end;
|
|
|
{ Generate result variable accessing function result }
|
|
|
vs:=tparavarsym.create('$result',paranr,vs_var,pd.rettype,[vo_is_funcret,vo_is_hidden_para]);
|
|
|
pd.parast.insert(vs);
|
|
@@ -152,7 +157,10 @@ implementation
|
|
|
begin
|
|
|
{ Generate self variable }
|
|
|
tt:=voidpointertype;
|
|
|
- vs:=tparavarsym.create('$self',paranr_self,vs_value,tt,[vo_is_self,vo_is_hidden_para]);
|
|
|
+ if is_interfacecom(tprocdef(pd)._class) then
|
|
|
+ vs:=tparavarsym.create('$self',paranr_self_com,vs_value,tt,[vo_is_self,vo_is_hidden_para])
|
|
|
+ else
|
|
|
+ vs:=tparavarsym.create('$self',paranr_self,vs_value,tt,[vo_is_self,vo_is_hidden_para]);
|
|
|
pd.parast.insert(vs);
|
|
|
end
|
|
|
else
|
|
@@ -190,7 +198,10 @@ implementation
|
|
|
vsp:=vs_var;
|
|
|
tt.setdef(tprocdef(pd)._class);
|
|
|
end;
|
|
|
- vs:=tparavarsym.create('$self',paranr_self,vsp,tt,[vo_is_self,vo_is_hidden_para]);
|
|
|
+ if is_interfacecom(tprocdef(pd)._class) then
|
|
|
+ vs:=tparavarsym.create('$self',paranr_self_com,vsp,tt,[vo_is_self,vo_is_hidden_para])
|
|
|
+ else
|
|
|
+ vs:=tparavarsym.create('$self',paranr_self,vsp,tt,[vo_is_self,vo_is_hidden_para]);
|
|
|
pd.parast.insert(vs);
|
|
|
|
|
|
akttokenpos:=storepos;
|