mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 07:34:28 +02:00
* Don't force CORBA (unmanaged) interfaces to be returned in parameter. All managed types including Variant and COM interfaces are already checked by handle_common_ret_in_param, superfluous checks removed.
Mantis #26593. git-svn-id: trunk@28716 -
This commit is contained in:
parent
e4f3f33692
commit
beeb85f11c
@ -179,15 +179,14 @@ implementation
|
||||
{ true if uses a parameter as return value }
|
||||
function tparamanager.ret_in_param(def:tdef;pd:tabstractprocdef):boolean;
|
||||
begin
|
||||
{ This handles all managed types, including COM interfaces and Variants }
|
||||
if handle_common_ret_in_param(def,pd,result) then
|
||||
exit;
|
||||
ret_in_param:=(def.typ=arraydef) or
|
||||
(def.typ=recorddef) or
|
||||
(def.typ=stringdef) or
|
||||
((def.typ=procvardef) and not tprocvardef(def).is_addressonly) or
|
||||
{ interfaces are also passed by reference to be compatible with delphi and COM }
|
||||
((def.typ=objectdef) and (is_object(def) or is_interface(def) or is_dispinterface(def))) or
|
||||
(def.typ=variantdef) or
|
||||
((def.typ=objectdef) and (is_object(def))) or
|
||||
((def.typ=setdef) and not is_smallset(def));
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user