-
Notifications
You must be signed in to change notification settings - Fork 716
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TypedPointer which is a type safe wrapper around Pointer. This relieves users of the generated bindings from knowing which types are expected. This should make it less likely that we cause a hard to debug panic or crash due to the kernel overwriting runtime memory. sys.Pointer still exists because there are some cases where we legitimately don't know what type to point at, for example the link info APIs. Map APIs are also unchanged for now because they don't benefit much from converting to TypedPointer[byte]. The trick to include "_ [0]*T" in TypedPointer is taken from atomic.Pointer in the Go stdlib. Signed-off-by: Lorenz Bauer <[email protected]>
- Loading branch information
Showing
20 changed files
with
256 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.