-
Notifications
You must be signed in to change notification settings - Fork 699
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
variable: return *btf.Var from Variable{Spec}.Type()
In the initial design, we decided to return the inner type from .Type(), but I forgot the outer btf.Var was needed to access decl tags set on the variable. Returning a *Var here is the most convenient way of accessing the tags, otherwise the caller would need to find the underlying map and parse the datasec manually, which goes against what this API aims to solve. Instead of the initial idea of returning a btf.Var as btf.Type, this now returns btf.Var directly. Signed-off-by: Timo Beckers <[email protected]>
- Loading branch information
Showing
3 changed files
with
17 additions
and
9 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