File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
content/courses/ada-in-practice/chapters Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -305,7 +305,7 @@ a tagged limited private type with a discriminant designating a
305
305
306
306
.. code-block :: ada
307
307
308
- type Lock_Manager (Lock : access Mutual_Exclusion) is
308
+ type Lock_Manager (Lock : not null access Mutual_Exclusion) is
309
309
tagged limited private;
310
310
311
311
We make it a limited type because copying doesn't make sense semantically for
@@ -320,7 +320,7 @@ that the type will be controlled because we don't intend :ada:`Initialize` and
320
320
321
321
.. code-block :: ada
322
322
323
- type Lock_Manager (Lock : access Mutual_Exclusion) is
323
+ type Lock_Manager (Lock : not null access Mutual_Exclusion) is
324
324
new Ada.Finalization.Limited_Controlled with null record;
325
325
326
326
No additional record components are required, beyond the access discriminant.
@@ -348,12 +348,12 @@ The full package spec is as follows:
348
348
(Initially_Available => True,
349
349
Ceiling => Default_Ceiling);
350
350
351
- type Lock_Manager (Lock : access Mutual_Exclusion) is
351
+ type Lock_Manager (Lock : not null access Mutual_Exclusion) is
352
352
tagged limited private;
353
353
354
354
private
355
355
356
- type Lock_Manager (Lock : access Mutual_Exclusion) is
356
+ type Lock_Manager (Lock : not null access Mutual_Exclusion) is
357
357
new Ada.Finalization.Limited_Controlled with null record;
358
358
359
359
overriding procedure Initialize (This : in out Lock_Manager);
You can’t perform that action at this time.
0 commit comments