diff options
Diffstat (limited to 'gcc/ada/a-chtgke.ads')
-rw-r--r-- | gcc/ada/a-chtgke.ads | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/gcc/ada/a-chtgke.ads b/gcc/ada/a-chtgke.ads index ccdee2f6bad..37256e2eb59 100644 --- a/gcc/ada/a-chtgke.ads +++ b/gcc/ada/a-chtgke.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2013, 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- -- @@ -59,6 +59,20 @@ package Ada.Containers.Hash_Tables.Generic_Keys is pragma Inline (Index); -- Returns the bucket number (array index value) for the given key + function Checked_Index + (HT : aliased in out Hash_Table_Type; + Key : Key_Type) return Hash_Type; + pragma Inline (Checked_Index); + -- Calls Index, but also locks and unlocks the container, per AI05-0022, in + -- order to detect element tampering by the generic actual Hash function. + + function Checked_Equivalent_Keys + (HT : aliased in out Hash_Table_Type; + Key : Key_Type; + Node : Node_Access) return Boolean; + -- Calls Equivalent_Keys, but locks and unlocks the container, per + -- AI05-0022, in order to detect element tampering by that generic actual. + procedure Delete_Key_Sans_Free (HT : in out Hash_Table_Type; Key : Key_Type; @@ -67,7 +81,9 @@ package Ada.Containers.Hash_Tables.Generic_Keys is -- without deallocating it. Program_Error is raised if the hash -- table is busy. - function Find (HT : Hash_Table_Type; Key : Key_Type) return Node_Access; + function Find + (HT : aliased in out Hash_Table_Type; + Key : Key_Type) return Node_Access; -- Returns the node (if any) corresponding to the given key generic |