Browse Source

* use voidpointertype.size (which supports i8086 far data memory models) instead
of sizeof(pint) in tobjectdef.size and tobjectdef.alignment when returning the
size and alignment of classes and interfaces

git-svn-id: trunk@27244 -

nickysn 11 years ago
parent
commit
043c0ba215
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/symdef.pas

+ 2 - 2
compiler/symdef.pas

@@ -6473,7 +6473,7 @@ implementation
     function tobjectdef.size : asizeint;
       begin
         if objecttype in [odt_class,odt_interfacecom,odt_interfacecorba,odt_dispinterface,odt_objcclass,odt_objcprotocol,odt_helper,odt_javaclass,odt_interfacejava] then
-          result:=sizeof(pint)
+          result:=voidpointertype.size
         else
           result:=tObjectSymtable(symtable).datasize;
       end;
@@ -6482,7 +6482,7 @@ implementation
     function tobjectdef.alignment:shortint;
       begin
         if objecttype in [odt_class,odt_interfacecom,odt_interfacecorba,odt_dispinterface,odt_objcclass,odt_objcprotocol,odt_helper,odt_javaclass,odt_interfacejava] then
-          alignment:=sizeof(pint)
+          alignment:=voidpointertype.size
         else
           alignment:=tObjectSymtable(symtable).recordalignment;
       end;