Browse Source

* declare the first field of TProcedureParam as TParamFlags to avoid potential problems if more than 8 entries should be used (especially if some day the hidden Self and High parameters should be written)
* rename first field of TProcedureParam to ParamFlags and introduce a property Flags for backwards and Delphi compatibility

git-svn-id: trunk@35174 -

svenbarth 8 years ago
parent
commit
1553aa5639
1 changed files with 8 additions and 1 deletions
  1. 8 1
      rtl/objpas/typinfo.pp

+ 8 - 1
rtl/objpas/typinfo.pp

@@ -169,10 +169,12 @@ unit typinfo;
       record
       record
       private
       private
         function GetParamType: PTypeInfo; inline;
         function GetParamType: PTypeInfo; inline;
+        function GetFlags: Byte; inline;
       public
       public
         property ParamType: PTypeInfo read GetParamType;
         property ParamType: PTypeInfo read GetParamType;
+        property Flags: Byte read GetFlags;
       public
       public
-        Flags: Byte;
+        ParamFlags: TParamFlags;
         ParamTypeRef: TypeInfoPtr;
         ParamTypeRef: TypeInfoPtr;
         Name: ShortString;
         Name: ShortString;
       end;
       end;
@@ -2277,6 +2279,11 @@ begin
   Result := DerefTypeInfoPtr(ParamTypeRef);
   Result := DerefTypeInfoPtr(ParamTypeRef);
 end;
 end;
 
 
+function TProcedureParam.GetFlags: Byte;
+begin
+  Result := Byte(ParamFlags);
+end;
+
 { TManagedField }
 { TManagedField }
 
 
 function TManagedField.GetTypeRef: PTypeInfo;
 function TManagedField.GetTypeRef: PTypeInfo;