Skip to content

Commit

Permalink
map: add a getter for Flags
Browse files Browse the repository at this point in the history
Add a getter for MapABI.Flags, so that we can deprecate MapABI without
losing access to Flags.
  • Loading branch information
lmb committed Nov 6, 2020
1 parent e1486d1 commit 14b24bc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion map.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,14 @@ func (m *Map) MaxEntries() uint32 {
return m.abi.MaxEntries
}

// Flags returns the flags of the map.
func (m *Map) Flags() uint32 {
return m.abi.Flags
}

// ABI gets the ABI of the Map.
//
// Deprecated: use Type, KeySize, ValueSize, MaxEntries instead.
// Deprecated: use Type, KeySize, ValueSize, MaxEntries and Flags instead.
func (m *Map) ABI() MapABI {
return m.abi
}
Expand Down

0 comments on commit 14b24bc

Please sign in to comment.