Commit d6f824bf by Vadim Godunko Committed by Arnaud Charlet

a-coinho.adb, [...]: Fix parameter mode of Update_Element.

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.

From-SVN: r212644
parent ab476638
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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment