diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/dyn_interning.adb | 7 | ||||
-rw-r--r-- | src/dyn_interning.ads | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/dyn_interning.adb b/src/dyn_interning.adb index 0550194f6..3388e184c 100644 --- a/src/dyn_interning.adb +++ b/src/dyn_interning.adb @@ -136,4 +136,11 @@ package body Dyn_Interning is pragma Assert (Index <= Wrapper_Tables.Last (Inst.Els)); return Inst.Els.Table (Index).Obj; end Get_By_Index; + + procedure Modify + (Inst : in out Instance; Index : Index_Type; Obj : Object_Type) is + begin + pragma Assert (Index <= Wrapper_Tables.Last (Inst.Els)); + Inst.Els.Table (Index).Obj := Obj; + end Modify; end Dyn_Interning; diff --git a/src/dyn_interning.ads b/src/dyn_interning.ads index 5412b6772..f0ec7d4a8 100644 --- a/src/dyn_interning.ads +++ b/src/dyn_interning.ads @@ -66,7 +66,13 @@ package Dyn_Interning is -- Get an element by index. The index has no real meaning, but the -- current implementation allocates index incrementally. function Get_By_Index (Inst : Instance; Index : Index_Type) - return Object_Type; + return Object_Type; + + -- Modify an existing object. + -- Must not change the definition of Equal! + procedure Modify + (Inst : in out Instance; Index : Index_Type; Obj : Object_Type); + private type Element_Wrapper is record Hash : Hash_Value_Type; |