• R/O
  • SSH

Ada95FL: Commit

Ada 95 foundation library


Commit MetaInfo

Revision10d34bc38b1c0376fc41f50f41c387249375e8ec (tree)
Zeit2019-09-15 07:00:33
AutorSergey Dukov <dukov54@live...>
CommiterSergey Dukov

Log Message

#32763 Удаление дискриминанта "Not_In_Pool"

Ändern Zusammenfassung

Diff

diff -r 3e1414dec30f -r 10d34bc38b1c src/vector_of_bytes.adb
--- a/src/vector_of_bytes.adb Sat Sep 14 23:08:04 2019 +0400
+++ b/src/vector_of_bytes.adb Sun Sep 15 02:00:33 2019 +0400
@@ -13,9 +13,12 @@
1313 Release(Object.RB.all, Released);
1414 end if;
1515 end if;
16- if not Object.Not_In_Pool then
16+ declare
17+ begin
1718 Free(This);
18- end if;
19+ exception
20+ when others => null;
21+ end;
1922 end Finalize;
2023
2124 procedure Copy (Target : in out Vector_Type; Source : Vector_Type)
@@ -95,8 +98,13 @@
9598 Vector.RB := null;
9699 Vector.Last := No_Index;
97100 Vector.BS := 0;
98- if not Vector.Not_In_Pool and then Unallocate then
99- Free(Vector_Ptr);
101+ if Unallocate then
102+ declare
103+ begin
104+ Free(Vector_Ptr);
105+ exception
106+ when others => null;
107+ end;
100108 end if;
101109 end Clean;
102110
diff -r 3e1414dec30f -r 10d34bc38b1c src/vector_of_bytes.ads
--- a/src/vector_of_bytes.ads Sat Sep 14 23:08:04 2019 +0400
+++ b/src/vector_of_bytes.ads Sun Sep 15 02:00:33 2019 +0400
@@ -35,7 +35,7 @@
3535 (Index_Type range <>) of aliased Element_Type;
3636 type Array_Of_Byte_Access is access all Array_Of_Byte_Type;
3737
38- type Vector_Type (Not_In_Pool : Boolean) is tagged limited private;
38+ type Vector_Type is tagged limited private;
3939 type Vector_Access is access all Vector_Type;
4040
4141 function Is_Empty (Vector : Vector_Type) return Boolean;
@@ -78,7 +78,7 @@
7878 procedure Free is
7979 new Ada.Unchecked_Deallocation (Referenced_Buffer, Referenced_Buffer_Ptr);
8080
81- type Vector_Type (Not_In_Pool : Boolean) is new Limited_Controlled with record
81+ type Vector_Type is new Limited_Controlled with record
8282 RB : Referenced_Buffer_Ptr := null;
8383 Last : Extended_Index := No_Index;
8484 BS : Natural := 0;
Show on old repository browser