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> 2014-07-16 Robert Dewar <dewar@adacore.com>
* a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
......
...@@ -67,12 +67,7 @@ package body Ada.Containers.Indefinite_Holders is ...@@ -67,12 +67,7 @@ package body Ada.Containers.Indefinite_Holders is
begin begin
if Control.Container /= null then if Control.Container /= null then
Reference (Control.Container.Reference); Reference (Control.Container.Reference);
Control.Container.Busy := Control.Container.Busy + 1;
declare
B : Natural renames Control.Container.Busy;
begin
B := B + 1;
end;
end if; end if;
end Adjust; end Adjust;
...@@ -179,9 +174,8 @@ package body Ada.Containers.Indefinite_Holders is ...@@ -179,9 +174,8 @@ package body Ada.Containers.Indefinite_Holders is
if Control.Container /= null then if Control.Container /= null then
Unreference (Control.Container.Reference); Unreference (Control.Container.Reference);
Control.Container.Busy := Control.Container.Busy - 1; Control.Container.Busy := Control.Container.Busy - 1;
Control.Container := null;
end if; end if;
Control.Container := null;
end Finalize; end Finalize;
-------------- --------------
...@@ -385,10 +379,10 @@ package body Ada.Containers.Indefinite_Holders is ...@@ -385,10 +379,10 @@ package body Ada.Containers.Indefinite_Holders is
-------------------- --------------------
procedure Update_Element procedure Update_Element
(Container : Holder; (Container : in out Holder;
Process : not null access procedure (Element : in out Element_Type)) Process : not null access procedure (Element : in out Element_Type))
is is
B : Natural renames Container'Unrestricted_Access.Busy; B : Natural renames Container.Busy;
begin begin
if Container.Reference = null then if Container.Reference = null then
......
...@@ -64,7 +64,7 @@ package Ada.Containers.Indefinite_Holders is ...@@ -64,7 +64,7 @@ package Ada.Containers.Indefinite_Holders is
(Container : Holder; (Container : Holder;
Process : not null access procedure (Element : Element_Type)); Process : not null access procedure (Element : Element_Type));
procedure Update_Element procedure Update_Element
(Container : Holder; (Container : in out Holder;
Process : not null access procedure (Element : in out Element_Type)); Process : not null access procedure (Element : in out Element_Type));
type Constant_Reference_Type type Constant_Reference_Type
......
...@@ -325,10 +325,10 @@ package body Ada.Containers.Indefinite_Holders is ...@@ -325,10 +325,10 @@ package body Ada.Containers.Indefinite_Holders is
-------------------- --------------------
procedure Update_Element procedure Update_Element
(Container : Holder; (Container : in out Holder;
Process : not null access procedure (Element : in out Element_Type)) Process : not null access procedure (Element : in out Element_Type))
is is
B : Natural renames Container'Unrestricted_Access.Busy; B : Natural renames Container.Busy;
begin begin
if Container.Element = null then if Container.Element = null then
......
...@@ -64,7 +64,7 @@ package Ada.Containers.Indefinite_Holders is ...@@ -64,7 +64,7 @@ package Ada.Containers.Indefinite_Holders is
Process : not null access procedure (Element : Element_Type)); Process : not null access procedure (Element : Element_Type));
procedure Update_Element procedure Update_Element
(Container : Holder; (Container : in out Holder;
Process : not null access procedure (Element : in out Element_Type)); Process : not null access procedure (Element : in out Element_Type));
type Constant_Reference_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