aboutsummaryrefslogtreecommitdiffstats
path: root/src/tables.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-11-13 06:07:50 +0100
committerTristan Gingold <tgingold@free.fr>2017-11-13 06:07:50 +0100
commit796d5a09cb31f1dbcdb021febfac8bc5fd112c21 (patch)
treefbda9ffe34fdc1b7c0aaaea4814a99a569228b51 /src/tables.adb
parent5c8fc25f3e27190f4ff8ce943e2d33375f2b9512 (diff)
downloadghdl-796d5a09cb31f1dbcdb021febfac8bc5fd112c21.tar.gz
ghdl-796d5a09cb31f1dbcdb021febfac8bc5fd112c21.tar.bz2
ghdl-796d5a09cb31f1dbcdb021febfac8bc5fd112c21.zip
tables: handle larger tables (use unsigned type instead of natural).
Diffstat (limited to 'src/tables.adb')
-rw-r--r--src/tables.adb4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/tables.adb b/src/tables.adb
index ef4cc385a..3b8a888b8 100644
--- a/src/tables.adb
+++ b/src/tables.adb
@@ -19,8 +19,7 @@
package body Tables is
function Allocate (Num : Natural := 1) return Table_Index_Type
is
- Res : constant Table_Index_Type := Table_Index_Type'Val
- (Table_Index_Type'Pos (Last) + 1);
+ Res : constant Table_Index_Type := Dyn_Table.Next (T);
begin
Dyn_Table.Allocate (T, Num);
@@ -62,7 +61,6 @@ package body Tables is
begin
Dyn_Table.Append (T, Val);
end Append;
-
begin
Init;
end Tables;