diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-06-23 14:44:34 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-06-23 14:44:34 +0200 |
commit | 6e1ee5c3d2023c7988a868b60ce0683bbcecb7e5 (patch) | |
tree | 1ce6fa5db63816fd6ff6b576aff227f6b37f6c4e /gcc/ada/a-swunau-shared.adb | |
parent | f52d94aad096e7762646e0f6e0b7f9243ea6a7ea (diff) | |
download | gcc-6e1ee5c3d2023c7988a868b60ce0683bbcecb7e5.zip gcc-6e1ee5c3d2023c7988a868b60ce0683bbcecb7e5.tar.gz gcc-6e1ee5c3d2023c7988a868b60ce0683bbcecb7e5.tar.bz2 |
[multiple changes]
2010-06-23 Thomas Quinot <quinot@adacore.com>
* exp_attr.adb (Expand_Access_To_Protected_Op): When rewriting a
reference to a protected subprogram outside of the protected's scope,
ensure the corresponding external subprogram is frozen before the
reference.
2010-06-23 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb: Fix typo in error message.
* sem.adb: Refine previous change.
2010-06-23 Robert Dewar <dewar@adacore.com>
* impunit.adb, a-suewen.adb, a-suewen.ads, a-suenco.adb, a-suenco.ads,
a-suezen.adb, a-suezen.ads, a-stuten.adb, a-stuten.ads, Makefile.rtl:
Implement Ada 2012 string encoding packages.
2010-06-23 Arnaud Charlet <charlet@adacore.com>
* a-stwiun-shared.adb, a-stwiun-shared.ads, a-stzunb-shared.adb,
a-stzunb-shared.ads, a-swunau-shared.adb, a-swuwti-shared.adb,
a-szunau-shared.adb, a-szuzti-shared.adb: New files.
* gcc-interface/Makefile.in: Enable use of above files.
From-SVN: r161277
Diffstat (limited to 'gcc/ada/a-swunau-shared.adb')
-rw-r--r-- | gcc/ada/a-swunau-shared.adb | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/gcc/ada/a-swunau-shared.adb b/gcc/ada/a-swunau-shared.adb new file mode 100644 index 0000000..d7fe3a7 --- /dev/null +++ b/gcc/ada/a-swunau-shared.adb @@ -0,0 +1,67 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME COMPONENTS -- +-- -- +-- A D A . S T R I N G S . W I D E _ U N B O U N D E D . A U X -- +-- -- +-- B o d y -- +-- -- +-- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- +-- -- +-- GNAT is free software; you can redistribute it and/or modify it under -- +-- terms of the GNU General Public License as published by the Free Soft- -- +-- ware Foundation; either version 2, or (at your option) any later ver- -- +-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- +-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- +-- for more details. You should have received a copy of the GNU General -- +-- Public License distributed with GNAT; see file COPYING. If not, write -- +-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- +-- Boston, MA 02110-1301, USA. -- +-- -- +-- As a special exception, if other files instantiate generics from this -- +-- unit, or you link this unit with other files to produce an executable, -- +-- this unit does not by itself cause the resulting executable to be -- +-- covered by the GNU General Public License. This exception does not -- +-- however invalidate any other reasons why the executable file might be -- +-- covered by the GNU Public License. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +package body Ada.Strings.Wide_Unbounded.Aux is + + --------------------- + -- Get_Wide_String -- + --------------------- + + procedure Get_Wide_String + (U : Unbounded_Wide_String; + S : out Big_Wide_String_Access; + L : out Natural) + is + X : aliased Big_Wide_String; + for X'Address use U.Reference.Data'Address; + begin + S := X'Unchecked_Access; + L := U.Reference.Last; + end Get_Wide_String; + + --------------------- + -- Set_Wide_String -- + --------------------- + + procedure Set_Wide_String + (UP : in out Unbounded_Wide_String; + S : Wide_String_Access) + is + X : Wide_String_Access := S; + + begin + Set_Unbounded_Wide_String (UP, S.all); + Free (X); + end Set_Wide_String; + +end Ada.Strings.Wide_Unbounded.Aux; |