summaryrefslogtreecommitdiff
path: root/gcc/ada/a-szunau.ads
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2005-03-15 16:53:10 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2005-03-15 16:53:10 +0100
commit2f388d2db6113fc8113d983c7370b7c45b1024ab (patch)
tree5ce32e503ea5e4af6010553a51d8e39be3fbf801 /gcc/ada/a-szunau.ads
parent798a90555d7d72881c3d81d773328dc4156b4e6e (diff)
downloadgcc-2f388d2db6113fc8113d983c7370b7c45b1024ab.tar.gz
re PR ada/13470 (64bits Ada bootstrap failure:xnmake etc. crash generating nmake.adb etc.)
2005-03-08 Robert Dewar <dewar@adacore.com> PR ada/13470 * a-stunau.ads, a-stunau.adb: Change interface to allow efficient (and correct) implementation The previous changes to allow extra space in unbounded strings had left this interface a bit broken. * a-suteio.adb: Avoid unnecessary use of Get/Set_String * g-spipat.ads, g-spipat.adb: New interface for Get_String Minor reformatting (function specs) * g-spitbo.adb: New interface for Get_String * g-spitbo.ads: Minor reformatting * a-swunau.ads, a-swunau.adb: New interface for Get_Wide_String * a-szunau.ads, a-szunau.adb: New interface for Get_Wide_Wide_String From-SVN: r96488
Diffstat (limited to 'gcc/ada/a-szunau.ads')
-rw-r--r--gcc/ada/a-szunau.ads24
1 files changed, 13 insertions, 11 deletions
diff --git a/gcc/ada/a-szunau.ads b/gcc/ada/a-szunau.ads
index dff8cb8e6c9..6333a1e7459 100644
--- a/gcc/ada/a-szunau.ads
+++ b/gcc/ada/a-szunau.ads
@@ -39,20 +39,22 @@
package Ada.Strings.Wide_Wide_Unbounded.Aux is
pragma Preelaborate (Aux);
- function Get_Wide_Wide_String
- (U : Unbounded_Wide_Wide_String) return Wide_Wide_String_Access;
+ procedure Get_Wide_Wide_String
+ (U : Unbounded_Wide_Wide_String;
+ S : out Wide_Wide_String_Access;
+ L : out Natural);
pragma Inline (Get_Wide_Wide_String);
- -- This function returns the internal string pointer used in the
- -- representation of an unbounded string. There is no copy involved,
- -- so the value obtained references the same string as the original
- -- unbounded string. The characters of this string may not be modified
- -- via the returned pointer, and are valid only as long as the original
- -- unbounded string is not modified. Violating either of these two
- -- rules results in erroneous execution.
+ -- This procedure returns the internal string pointer used in the
+ -- representation of an unbounded string as well as the actual current
+ -- length (which may be less than S.all'Length because in general there
+ -- can be extra space assigned). The characters of this string may be
+ -- not be modified via the returned pointer, and are valid only as
+ -- long as the original unbounded string is not accessed or modified.
--
- -- This function is much more efficient than the use of To_Wide_Wide_String
+ -- This procedure is more efficient than the use of To_Wide_Wide_String
-- since it avoids the need to copy the string. The lower bound of the
- -- referenced string returned by this call is always one.
+ -- referenced string returned by this call is always one, so the actual
+ -- string data is always accessible as S (1 .. L).
procedure Set_Wide_Wide_String
(UP : in out Unbounded_Wide_Wide_String;