]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2014-07-16 Vadim Godunko <godunko@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Jul 2014 13:54:43 +0000 (13:54 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Jul 2014 13:54:43 +0000 (13:54 +0000)
* a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
Fix parameter mode of Update_Element.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212644 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/a-coinho-shared.adb
gcc/ada/a-coinho-shared.ads
gcc/ada/a-coinho.adb
gcc/ada/a-coinho.ads

index 2ff72261881c01c5f656a56c0c56374a48c6e789..0134a76a111eb445d99935bb6f6f07c33f760d71 100644 (file)
@@ -1,3 +1,8 @@
+2014-07-16  Vadim Godunko  <godunko@adacore.com>
+
+       * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
+       Fix parameter mode of Update_Element.
+
 2014-07-16  Robert Dewar  <dewar@adacore.com>
 
        * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
index df2d55ad574eb2ae2c8db7dc4d9e0dad799d6516..defdf3ad17feb56a4f5b9e645b0fb72df48e230e 100644 (file)
@@ -67,12 +67,7 @@ package body Ada.Containers.Indefinite_Holders is
    begin
       if Control.Container /= null then
          Reference (Control.Container.Reference);
-
-         declare
-            B : Natural renames Control.Container.Busy;
-         begin
-            B := B + 1;
-         end;
+         Control.Container.Busy := Control.Container.Busy + 1;
       end if;
    end Adjust;
 
@@ -179,9 +174,8 @@ package body Ada.Containers.Indefinite_Holders is
       if Control.Container /= null then
          Unreference (Control.Container.Reference);
          Control.Container.Busy := Control.Container.Busy - 1;
+         Control.Container := null;
       end if;
-
-      Control.Container := null;
    end Finalize;
 
    --------------
@@ -385,10 +379,10 @@ package body Ada.Containers.Indefinite_Holders is
    --------------------
 
    procedure Update_Element
-     (Container : Holder;
+     (Container : in out Holder;
       Process   : not null access procedure (Element : in out Element_Type))
    is
-      B : Natural renames Container'Unrestricted_Access.Busy;
+      B : Natural renames Container.Busy;
 
    begin
       if Container.Reference = null then
index 3e1ed18a4b0baf17aca22286cde0aed11d07fb40..df364b3426e75e7441878d53ec8a7088439dcad3 100644 (file)
@@ -64,7 +64,7 @@ package Ada.Containers.Indefinite_Holders is
      (Container : Holder;
       Process   : not null access procedure (Element : Element_Type));
    procedure Update_Element
-     (Container : Holder;
+     (Container : in out Holder;
       Process   : not null access procedure (Element : in out Element_Type));
 
    type Constant_Reference_Type
index 9fe4c143e4d637c6fe6990c4a7fbcb01e97c191b..2cdba9957c105864d8c89293d98674c03431aaa1 100644 (file)
@@ -325,10 +325,10 @@ package body Ada.Containers.Indefinite_Holders is
    --------------------
 
    procedure Update_Element
-     (Container : Holder;
+     (Container : in out Holder;
       Process   : not null access procedure (Element : in out Element_Type))
    is
-      B : Natural renames Container'Unrestricted_Access.Busy;
+      B : Natural renames Container.Busy;
 
    begin
       if Container.Element = null then
index c5f45f5463632118025aa9a892d72a2943027d0b..2f81d750fceaa45323995aab3c62c3b119562968 100644 (file)
@@ -64,7 +64,7 @@ package Ada.Containers.Indefinite_Holders is
       Process   : not null access procedure (Element : Element_Type));
 
    procedure Update_Element
-     (Container : Holder;
+     (Container : in out Holder;
       Process   : not null access procedure (Element : in out Element_Type));
 
    type Constant_Reference_Type