浏览代码

* fix compilation on systems where SizeOf(CodePointer) <> SizeOf(Pointer): disable ToString for tkMethod on these systems for now

Sven/Sarah Barth 10 月之前
父节点
当前提交
f70a430b6f
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      packages/rtl-objpas/src/inc/rtti.pp

+ 4 - 0
packages/rtl-objpas/src/inc/rtti.pp

@@ -4125,7 +4125,11 @@ begin
       else
         Result:='<Nil>';  
       end;
+    {$IF SIZEOF(POINTER) = SIZEOF(CODEPOINTER)}
+    { if CodePointer is not the same as Pointer then it currently can't be
+      passed onto a array of const }
     tkMethod: Result := Format('(method code=%p, data=%p)', [FData.FAsMethod.Code, FData.FAsMethod.Data]);
+    {$ENDIF}
   else
     result := '<unknown kind: '+GetEnumName(System.TypeInfo(TTypeKind),Ord(Kind))+'>';
   end;