aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/a-comutr.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/a-comutr.ads')
-rw-r--r--gcc/ada/a-comutr.ads25
1 files changed, 22 insertions, 3 deletions
diff --git a/gcc/ada/a-comutr.ads b/gcc/ada/a-comutr.ads
index 20a91bb..6e0aa9a 100644
--- a/gcc/ada/a-comutr.ads
+++ b/gcc/ada/a-comutr.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 --
@@ -111,10 +111,12 @@ package Ada.Containers.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);
@@ -423,8 +425,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;
@@ -439,7 +455,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;