mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-07 20:43:40 +00:00
Implement len() for map types
This commit is contained in:
@@ -98,6 +98,7 @@ func hashmapSet(m *hashmap, key string, value unsafe.Pointer) {
|
||||
bucket = bucket.next
|
||||
}
|
||||
if emptySlotKey != nil {
|
||||
m.count++
|
||||
*emptySlotKey = key
|
||||
memcpy(emptySlotValue, value, uintptr(m.valueSize))
|
||||
*emptySlotTophash = tophash
|
||||
|
||||
Reference in New Issue
Block a user