Browse Source

* changed the visibility of the writeport and readport methods in the ports unit
objects to private (since they should be accessed only through the default
indexed property)

git-svn-id: trunk@39421 -

nickysn 7 years ago
parent
commit
8e6205aca6
3 changed files with 15 additions and 3 deletions
  1. 6 0
      rtl/i386/portsh.inc
  2. 6 0
      rtl/i8086/portsh.inc
  3. 3 3
      rtl/x86_64/portsh.inc

+ 6 - 0
rtl/i386/portsh.inc

@@ -35,20 +35,26 @@ type
    end;
 {$else VER3_0}
    tport = object
+   private
       procedure writeport(p : word;data : byte);inline;
       function  readport(p : word) : byte;inline;
+   public
       property pp[w : word] : byte read readport write writeport;default;
    end;
 
    tportw = object
+   private
       procedure writeport(p : word;data : word);inline;
       function  readport(p : word) : word;inline;
+   public
       property pp[w : word] : word read readport write writeport;default;
    end;
 
    tportl = object
+   private
       procedure writeport(p : word;data : longint);inline;
       function  readport(p : word) : longint;inline;
+   public
       property pp[w : word] : longint read readport write writeport;default;
    end;
 {$endif VER3_0}

+ 6 - 0
rtl/i8086/portsh.inc

@@ -15,20 +15,26 @@
 
 type
    tport = object
+   private
       procedure writeport(p : word;data : byte);inline;
       function  readport(p : word) : byte;inline;
+   public
       property pp[w : word] : byte read readport write writeport;default;
    end;
 
    tportw = object
+   private
       procedure writeport(p : word;data : word);inline;
       function  readport(p : word) : word;inline;
+   public
       property pp[w : word] : word read readport write writeport;default;
    end;
 
    tportl = object
+   private
       procedure writeport(p : word;data : longint);
       function  readport(p : word) : longint;
+   public
       property pp[w : word] : longint read readport write writeport;default;
    end;
 

+ 3 - 3
rtl/x86_64/portsh.inc

@@ -18,7 +18,7 @@
 
 type
    tport = object
-     protected
+     private
        procedure writeport(p : longint;data : byte);inline;
        function  readport(p : longint) : byte;inline;
      public
@@ -26,7 +26,7 @@ type
    end;
 
    tportw = object
-     protected
+     private
        procedure writeport(p : longint;data : word);inline;
        function  readport(p : longint) : word;inline;
      public
@@ -34,7 +34,7 @@ type
    end;
 
    tportl = object
-     Protected
+     Private
        procedure writeport(p : longint;data : longint);inline;
        function  readport(p : longint) : longint;inline;
      Public