瀏覽代碼

* correctly handle record, set and array results if no extended parameter information is available

git-svn-id: trunk@40669 -
svenbarth 6 年之前
父節點
當前提交
9eac2ea852
共有 1 個文件被更改,包括 18 次插入0 次删除
  1. 18 0
      packages/rtl-objpas/src/x86_64/invoke.inc

+ 18 - 0
packages/rtl-objpas/src/x86_64/invoke.inc

@@ -100,6 +100,24 @@ begin
       tkInterface,
       tkDynArray:
         Result := True;
+      tkArray: begin
+        td := GetTypeData(aType);
+        Result := not (td^.ArrayData.Size in [1, 2, 4, 8]);
+      end;
+      tkRecord: begin
+        td := GetTypeData(aType);
+        Result := not (td^.RecSize in [1, 2, 4, 8]);
+      end;
+      tkSet: begin
+        td := GetTypeData(aType);
+        case td^.OrdType of
+          otUByte:
+            Result := not (td^.SetSize in [1, 2, 4, 8]);
+          otUWord,
+          otULong:
+            Result := False;
+        end;
+      end;
     end;
   end;
 end;