runtime: map
This commit is contained in:
@@ -16,6 +16,12 @@
|
||||
|
||||
package runtime
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"github.com/goplus/llgo/internal/abi"
|
||||
)
|
||||
|
||||
// Map represents a Go map.
|
||||
type Map = hmap
|
||||
|
||||
@@ -23,3 +29,8 @@ type Map = hmap
|
||||
func MakeSmallMap() *Map {
|
||||
return makemap_small()
|
||||
}
|
||||
|
||||
// Mapassign finds a key in map m and returns the elem address to assign.
|
||||
func Mapassign(t *abi.MapType, m *Map, key unsafe.Pointer) unsafe.Pointer {
|
||||
return mapassign(t, m, key)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user