From Jason Turner

[ios.base.storage]

Diff to HTML by rtfpessoa

tmp/tmpjbf2xkq3/{from.md → to.md} RENAMED
@@ -1,20 +1,22 @@
1
- #### `ios_base` storage functions <a id="ios.base.storage">[[ios.base.storage]]</a>
2
 
3
  ``` cpp
4
  static int xalloc();
5
  ```
6
 
7
  *Returns:* `index` `++`.
8
 
9
- *Remarks:* Concurrent access to this function by multiple threads shall
10
- not result in a data race ([[intro.multithread]]).
11
 
12
  ``` cpp
13
  long& iword(int idx);
14
  ```
15
 
 
 
16
  *Effects:* If `iarray` is a null pointer, allocates an array of `long`
17
  of unspecified size and stores a pointer to its first element in
18
  `iarray`. The function then extends the array pointed at by `iarray` as
19
  necessary to include the element `iarray[idx]`. Each newly allocated
20
  element of the array is initialized to zero. The reference returned is
@@ -31,10 +33,12 @@ initialized to 0.
31
 
32
  ``` cpp
33
  void*& pword(int idx);
34
  ```
35
 
 
 
36
  *Effects:* If `parray` is a null pointer, allocates an array of pointers
37
  to `void` of unspecified size and stores a pointer to its first element
38
  in `parray`. The function then extends the array pointed at by `parray`
39
  as necessary to include the element `parray[idx]`. Each newly allocated
40
  element of the array is initialized to a null pointer. The reference
 
1
+ #### Storage functions <a id="ios.base.storage">[[ios.base.storage]]</a>
2
 
3
  ``` cpp
4
  static int xalloc();
5
  ```
6
 
7
  *Returns:* `index` `++`.
8
 
9
+ *Remarks:* Concurrent access to this function by multiple threads does
10
+ not result in a data race [[intro.multithread]].
11
 
12
  ``` cpp
13
  long& iword(int idx);
14
  ```
15
 
16
+ *Preconditions:* `idx` is a value obtained by a call to `xalloc`.
17
+
18
  *Effects:* If `iarray` is a null pointer, allocates an array of `long`
19
  of unspecified size and stores a pointer to its first element in
20
  `iarray`. The function then extends the array pointed at by `iarray` as
21
  necessary to include the element `iarray[idx]`. Each newly allocated
22
  element of the array is initialized to zero. The reference returned is
 
33
 
34
  ``` cpp
35
  void*& pword(int idx);
36
  ```
37
 
38
+ *Preconditions:* `idx` is a value obtained by a call to `xalloc`.
39
+
40
  *Effects:* If `parray` is a null pointer, allocates an array of pointers
41
  to `void` of unspecified size and stores a pointer to its first element
42
  in `parray`. The function then extends the array pointed at by `parray`
43
  as necessary to include the element `parray[idx]`. Each newly allocated
44
  element of the array is initialized to a null pointer. The reference