Annotation of OpenXM_contrib/PHC/Ada/Math_Lib/Matrices/generic_vecvecs.adb, Revision 1.1.1.1
1.1 maekawa 1: with unchecked_deallocation;
2:
3: package body Generic_VecVecs is
4:
5: procedure Clear ( v : in out VecVec ) is
6: begin
7: for i in v'range loop
8: Vectors.Clear(v(i));
9: end loop;
10: end Clear;
11:
12: procedure Shallow_Clear ( v : in out Link_to_VecVec ) is
13:
14: procedure free is new unchecked_deallocation(VecVec,Link_to_VecVec);
15:
16: begin
17: free(v);
18: end Shallow_Clear;
19:
20: procedure Deep_Clear ( v : in out Link_to_VecVec ) is
21: begin
22: if v /= null
23: then Clear(v.all);
24: Shallow_Clear(v);
25: end if;
26: end Deep_Clear;
27:
28: end Generic_VecVecs;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>