]> git.pld-linux.org Git - packages/compat-gcc-34.git/blame - compat-gcc-34-pr13470.patch
- begin with compat gcc
[packages/compat-gcc-34.git] / compat-gcc-34-pr13470.patch
CommitLineData
36829a82
AM
1===================================================================
2RCS file: /cvs/gcc/gcc/gcc/ada/a-stunau.adb,v
3retrieving revision 1.5
4retrieving revision 1.6
5diff -u -r1.5 -r1.6
6--- gcc/gcc/ada/a-stunau.adb 2003/10/21 13:41:54 1.5
7+++ gcc/gcc/ada/a-stunau.adb 2005/01/18 22:00:12 1.6
8@@ -48,16 +48,18 @@
9
10 U_Ptr : constant Unbounded_String_Access := U'Unrestricted_Access;
11 -- Unbounded_String is a controlled type which is always passed
12- -- by copy it is always safe to take the pointer to such object
13- -- here. This pointer is used to set the U.Reference value which
14- -- would not be possible otherwise as U is read-only.
15+ -- by reference. It is always safe to take the pointer to such
16+ -- object here. This pointer is used to set the U.Reference
17+ -- value which would not be possible otherwise as U is read-only.
18
19 Old : String_Access := U.Reference;
20+ Ret : String_Access;
21
22 begin
23- U_Ptr.Reference := new String'(U.Reference (1 .. U.Last));
24+ Ret := new String'(U.Reference (1 .. U.Last));
25+ U_Ptr.Reference := Ret;
26 Free (Old);
27- return U.Reference;
28+ return Ret;
29 end;
30 end if;
31 end Get_String;
This page took 0.146375 seconds and 4 git commands to generate.