Browse Source

* fixed uses of custom-length string types in function/property
result types

git-svn-id: trunk@9486 -

Jonas Maebe 17 years ago
parent
commit
0bf43d223b
3 changed files with 14 additions and 7 deletions
  1. 4 2
      compiler/ogbase.pas
  2. 5 2
      compiler/powerpc/agppcmpw.pas
  3. 5 3
      compiler/ppcgen/agppcgas.pas

+ 4 - 2
compiler/ogbase.pas

@@ -208,9 +208,11 @@ interface
      end;
      TObjSectionClass = class of TObjSection;
 
+     TString80 = string[80];
+
      TObjData = class(TLinkedListItem)
      private
-       FName       : string[80];
+       FName       : TString80;
        FCurrObjSec : TObjSection;
        FObjSectionList  : TFPHashObjectList;
        FCObjSection     : TObjSectionClass;
@@ -256,7 +258,7 @@ interface
        procedure afteralloc;virtual;
        procedure afterwrite;virtual;
        procedure resetsections;
-       property Name:string[80] read FName;
+       property Name:TString80 read FName;
        property CurrObjSec:TObjSection read FCurrObjSec;
        property ObjSymbolList:TFPHashObjectList read FObjSymbolList;
        property ObjSectionList:TFPHashObjectList read FObjSectionList;

+ 5 - 2
compiler/powerpc/agppcmpw.pas

@@ -238,8 +238,11 @@ interface
       end;
     end;
 
-    function branchmode(o: tasmop): string[4];
-      var tempstr: string[4];
+    type
+      topstr = string[4];
+
+    function branchmode(o: tasmop): topstr;
+      var tempstr: topstr;
       begin
         tempstr := '';
         case o of

+ 5 - 3
compiler/ppcgen/agppcgas.pas

@@ -52,10 +52,12 @@ unit agppcgas;
       function MakeCmdLine: TCmdStr; override;
     end;
 
+    topstr = string[4];
+
     function getreferencestring(var ref : treference) : string;
     function getopstr_jmp(const o:toper) : string;
     function getopstr(const o:toper) : string;
-    function branchmode(o: tasmop): string[4];
+    function branchmode(o: tasmop): topstr;
     function cond2str(op: tasmop; c: tasmcond): string;  
 
   implementation
@@ -209,8 +211,8 @@ unit agppcgas;
     end;
 
 
-    function branchmode(o: tasmop): string[4];
-      var tempstr: string[4];
+    function branchmode(o: tasmop): topstr;
+      var tempstr: topstr;
       begin
         tempstr := '';
         case o of