File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -88,12 +88,12 @@ Calculating the offset between the start of the data structure to the field of t
88
88
We propose to add a function to help perform this operation on raw pointer types:
89
89
``` swift
90
90
extension UnsafeRawPointer {
91
- public func alignedUp <T >(for : T.type ) -> Self
91
+ public func alignedUp <T >(for : T.Type ) -> Self
92
92
}
93
93
```
94
94
95
95
This function will round the current pointer up to the next address properly aligned to access an instance of ` T ` .
96
- When applied to a ` self ` already aligned for ` T ` , ` UnsafeRawPointer.aligned (for:) ` will return ` self ` .
96
+ When applied to a ` self ` already aligned for ` T ` , ` UnsafeRawPointer.alignedUp (for:) ` will return ` self ` .
97
97
98
98
The new function would make identifying the storage location of ` T ` much more straightforward than in the example above:
99
99
``` swift
You can’t perform that action at this time.
0 commit comments