Browse Source

* fixed alignment of classes

florian 21 years ago
parent
commit
4ccec73aa5
2 changed files with 13 additions and 4 deletions
  1. 5 2
      compiler/globals.pas
  2. 8 2
      compiler/symdef.pas

+ 5 - 2
compiler/globals.pas

@@ -435,7 +435,7 @@ implementation
 
 
      procedure DefaultReplacements(var s:string);
      procedure DefaultReplacements(var s:string);
        begin
        begin
-         { Replace some macro's }
+         { Replace some macros }
          Replace(s,'$FPCVER',version_string);
          Replace(s,'$FPCVER',version_string);
          Replace(s,'$VERSION',version_string);
          Replace(s,'$VERSION',version_string);
          Replace(s,'$FULLVERSION',full_version_string);
          Replace(s,'$FULLVERSION',full_version_string);
@@ -1796,7 +1796,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.121  2004-01-14 23:39:05  florian
+  Revision 1.122  2004-01-28 21:05:56  florian
+    * fixed alignment of classes
+
+  Revision 1.121  2004/01/14 23:39:05  florian
     * another bunch of x86-64 fixes mainly calling convention and
     * another bunch of x86-64 fixes mainly calling convention and
       assembler reader related
       assembler reader related
 
 

+ 8 - 2
compiler/symdef.pas

@@ -5021,7 +5021,10 @@ implementation
 
 
     function tobjectdef.alignment:longint;
     function tobjectdef.alignment:longint;
       begin
       begin
-        alignment:=tobjectsymtable(symtable).recordalignment;
+        if objecttype in [odt_class,odt_interfacecom,odt_interfacecorba] then
+          alignment:=POINTER_SIZE
+        else
+          alignment:=tobjectsymtable(symtable).recordalignment;
       end;
       end;
 
 
 
 
@@ -6161,7 +6164,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.211  2004-01-28 20:30:18  peter
+  Revision 1.212  2004-01-28 21:05:56  florian
+    * fixed alignment of classes
+
+  Revision 1.211  2004/01/28 20:30:18  peter
     * record alignment splitted in fieldalignment and recordalignment,
     * record alignment splitted in fieldalignment and recordalignment,
       the latter is used when this record is inserted in another record.
       the latter is used when this record is inserted in another record.