diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-23 12:44:34 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-23 12:44:34 +0000 |
commit | d73d4db07b0f68ca63161a49deb911ff89d9cdcc (patch) | |
tree | 1ce6fa5db63816fd6ff6b576aff227f6b37f6c4e /gcc/ada/a-swunau-shared.adb | |
parent | 090ce0bc1838e28b5ab5b195dca8871dec41d047 (diff) | |
download | ppe42-gcc-d73d4db07b0f68ca63161a49deb911ff89d9cdcc.tar.gz ppe42-gcc-d73d4db07b0f68ca63161a49deb911ff89d9cdcc.zip |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161277 138bc75d-0d04-0410-961f-82ee72b054a4
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 00000000000..d7fe3a76d30 --- /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; |