Browse Source

* interfaces return values need to be passed in parameters

git-svn-id: trunk@3194 -
peter 19 years ago
parent
commit
b7a936faa0
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/paramgr.pas

+ 2 - 1
compiler/paramgr.pas

@@ -141,7 +141,8 @@ implementation
            (def.deftype=recorddef) or
            ((def.deftype=stringdef) and (tstringdef(def).string_typ in [st_shortstring,st_longstring])) or
            ((def.deftype=procvardef) and (po_methodpointer in tprocvardef(def).procoptions)) or
-           ((def.deftype=objectdef) and is_object(def)) or
+           { interfaces are also passed by reference to be compatible with delphi and COM }
+           ((def.deftype=objectdef) and (is_object(def) or is_interface(def))) or
            (def.deftype=variantdef) or
            ((def.deftype=setdef) and (tsetdef(def).settype<>smallset));
       end;