Skip to content

Commit 8a33e6c

Browse files
committed
Allocate everything on the stack
1 parent b6a9e8c commit 8a33e6c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/alire/alire-reserved.adb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
package body Alire.Reserved is
22

3+
type String_Access is access constant String;
4+
type String_Array is array (Positive range <>) of String_Access;
5+
36
-- list of Ada2022 and GPR keywords
4-
Reserved_Keywords : constant array (Positive range <>) of
5-
access constant String :=
7+
Reserved_Keywords : constant access String_Array :=
8+
new String_Array'
69
(
710
new String'("abort"),
811
new String'("abs"),
@@ -89,6 +92,6 @@ package body Alire.Reserved is
8992
----------------
9093

9194
function Is_Keyword (S : String) return Boolean
92-
is (for some K of Reserved_Keywords => S = K.all);
95+
is (for some K of Reserved_Keywords.all => S = K.all);
9396

9497
end Alire.Reserved;

0 commit comments

Comments
 (0)