From 59303c511304e616c25f7b5345acef31f6aa0c31 Mon Sep 17 00:00:00 2001 From: svenbarth Date: Sat, 23 Jul 2016 16:42:15 +0000 Subject: [PATCH] Fix -CR after the recent VMT changes. * tobjectvmt: parent needs to be ppointer for 3.1.1 * fpc_check_object_ext: correctly determine parent VMT git-svn-id: trunk@34194 - --- rtl/inc/generic.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rtl/inc/generic.inc b/rtl/inc/generic.inc index aa422bb090..8ffcb4ba4c 100644 --- a/rtl/inc/generic.inc +++ b/rtl/inc/generic.inc @@ -747,7 +747,7 @@ type pobjectvmt=^tobjectvmt; tobjectvmt=record size,msize:sizeuint; - parent:pointer; + parent:{$ifdef VER3_0}pointer{$else}ppointer{$endif}; end; {$ifndef FPC_SYSTEM_HAS_FPC_HELP_CONSTRUCTOR} @@ -852,7 +852,14 @@ begin if vmt=expvmt then exit else + {$ifdef VER3_0} vmt:=pobjectvmt(vmt)^.parent; + {$else VER3_0} + if assigned(pobjectvmt(vmt)^.parent) then + vmt:=pobjectvmt(vmt)^.parent^ + else + exit; + {$endif} RunError(219); end; {$endif not FPC_SYSTEM_HAS_FPC_CHECK_OBJECT_EXT}