summaryrefslogtreecommitdiff
path: root/gcc/ada/a-cimutr.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/a-cimutr.ads')
-rw-r--r--gcc/ada/a-cimutr.ads25
1 files changed, 22 insertions, 3 deletions
diff --git a/gcc/ada/a-cimutr.ads b/gcc/ada/a-cimutr.ads
index 87c0e41f1d5..6c3411f1314 100644
--- a/gcc/ada/a-cimutr.ads
+++ b/gcc/ada/a-cimutr.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2004-2011, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2012, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
@@ -112,10 +112,12 @@ package Ada.Containers.Indefinite_Multiway_Trees is
function Constant_Reference
(Container : aliased Tree;
Position : Cursor) return Constant_Reference_Type;
+ pragma Inline (Constant_Reference);
function Reference
(Container : aliased in out Tree;
Position : Cursor) return Reference_Type;
+ pragma Inline (Reference);
procedure Assign (Target : in out Tree; Source : Tree);
@@ -378,8 +380,22 @@ private
for Cursor'Read use Read;
+ type Reference_Control_Type is
+ new Controlled with record
+ Container : Tree_Access;
+ end record;
+
+ overriding procedure Adjust (Control : in out Reference_Control_Type);
+ pragma Inline (Adjust);
+
+ overriding procedure Finalize (Control : in out Reference_Control_Type);
+ pragma Inline (Finalize);
+
type Constant_Reference_Type
- (Element : not null access constant Element_Type) is null record;
+ (Element : not null access constant Element_Type) is
+ record
+ Control : Reference_Control_Type;
+ end record;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
@@ -394,7 +410,10 @@ private
for Constant_Reference_Type'Write use Write;
type Reference_Type
- (Element : not null access Element_Type) is null record;
+ (Element : not null access Element_Type) is
+ record
+ Control : Reference_Control_Type;
+ end record;
procedure Read
(Stream : not null access Root_Stream_Type'Class;