diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-23 09:39:00 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-23 09:39:00 +0000 |
commit | 1cdb8abaddbe53a1ab9f9b8a79f56e2a61b44e8c (patch) | |
tree | e8e6d4b216634565907a5eb44fff365de722eb4d /gcc/ada/s-strhas.ads | |
parent | d24288e38ccc798f932cacbe75e794c9e10592e6 (diff) | |
download | gcc-1cdb8abaddbe53a1ab9f9b8a79f56e2a61b44e8c.tar.gz |
2009-06-23 Robert Dewar <dewar@adacore.com>
* s-strhas.adb, s-strhas.ads: Restrict to 32-bit modular types
* s-imgdec.adb (Set_Decimal_Digits): Fix error of too many digits for
small values
* prj-conf.ads: Minor reformatting
* prj-conf.adb: Minor reformatting
2009-06-23 Vasiliy Fofanov <fofanov@adacore.com>
* g-debpoo.adb (Dump_Gnatmem): Output dummy timestamps for allocations
to correspond to the log format that gnatmem now expects.
2009-06-23 Vincent Celier <celier@adacore.com>
* prj-attr.adb: New attributes Initial_Required_Switches,
Final_Required_Switches and Object_File_Switches
* prj-nmsc.adb (Process_Compiler): Process new attributes
Name_Final_Required_Switches, Name_Initial_Required_Switches and
Name_Object_File_Switches.
* prj.ads (Language_Config): New component
Compiler_Initial_Required_Switches (replace Compiler_Required_Switches),
Compiler_Final_Required_Switches and Object_File_Switches.
* snames.ads-tmpl: New standard names Initial_Required_Switches,
Final_Required_Switches and Object_File_Switches
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148837 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-strhas.ads')
-rw-r--r-- | gcc/ada/s-strhas.ads | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/ada/s-strhas.ads b/gcc/ada/s-strhas.ads index 7e721558732..c2e72ccbb7c 100644 --- a/gcc/ada/s-strhas.ads +++ b/gcc/ada/s-strhas.ads @@ -29,13 +29,14 @@ -- -- ------------------------------------------------------------------------------ --- This package provides a generic hashing function over strings, --- suitable for use with a string keyed hash table. +-- This package provides a generic hashing function over strings, suitable for +-- use with a string keyed hash table. In particular, it is the basis for the +-- string hash functions in Ada.Containers. -- --- The strategy used here is not appropriate for applications that --- require cryptographically strong hashes, or for application which --- wish to use very wide hash values as pseudo unique identifiers. In --- such cases please refer to GNAT.SHA1 and GNAT.MD5. +-- The algorithm used here is not appropriate for applications that require +-- cryptographically strong hashes, or for application which wish to use very +-- wide hash values as pseudo unique identifiers. In such cases please refer +-- to GNAT.SHA1 and GNAT.MD5. package System.String_Hash is pragma Pure; @@ -48,7 +49,9 @@ package System.String_Hash is -- The string type to use as a hash key type Hash_Type is mod <>; - -- The type to be returned as a hash value + -- The type to be returned as a hash value. This must be a 32-bit + -- unsigned type with full range 0 .. 2**32-1, no other type is allowed + -- for this instantiation (checked in the body by Compile_Time_Error). function Hash (Key : Key_Type) return Hash_Type; pragma Inline (Hash); |