From f7a7752f1e3bfe9ff164795bd94b39d74005bf3a Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 17 Oct 2019 06:53:50 +0200 Subject: syn_interning: add get_index. --- src/dyn_interning.ads | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/dyn_interning.ads') diff --git a/src/dyn_interning.ads b/src/dyn_interning.ads index 2b5dc5ee4..c1bdab420 100644 --- a/src/dyn_interning.ads +++ b/src/dyn_interning.ads @@ -47,14 +47,18 @@ package Dyn_Interning is procedure Free (Inst : in out Instance); + type Index_Type is new Uns32; + No_Index : constant Index_Type := 0; + First_Index : constant Index_Type := 1; + -- If there is already an existing object for PARAMS, return it. -- Otherwise create it. procedure Get (Inst : in out Instance; Params : Params_Type; Res : out Object_Type); - type Index_Type is new Uns32; - No_Index : constant Index_Type := 0; - First_Index : constant Index_Type := 1; + -- Likewise, but return its index. + procedure Get_Index + (Inst : in out Instance; Params : Params_Type; Idx : out Index_Type); -- Get the number of elements in the table. function Last_Index (Inst : Instance) return Index_Type; -- cgit v1.2.3