Skip to content

Commit 38d4bcb

Browse files
committed
core/box: m rename strmap to comap
1 parent 2e85ce4 commit 38d4bcb

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

intra/backend/core_boxes.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ const (
2222
maxinternattempts = 3
2323
)
2424

25-
type strmap[T any] sync.Map
25+
type comap[T any] sync.Map
2626

2727
// pointer to pointer v pointer to Gostr both come out
2828
// with equal behaviour: go.dev/play/p/4qT1JACgdHG
29-
func (s *strmap[T]) get(k unique.Handle[string]) (**T, bool) {
29+
func (s *comap[T]) get(k unique.Handle[string]) (**T, bool) {
3030
m := (*sync.Map)(s)
3131
if w, ok := m.Load(k); ok {
3232
if v, ok := w.(weak.Pointer[T]); ok {
@@ -40,7 +40,7 @@ func (s *strmap[T]) get(k unique.Handle[string]) (**T, bool) {
4040
return nil, false
4141
}
4242

43-
func (s *strmap[T]) put(k unique.Handle[string], v **T) (**T, bool) {
43+
func (s *comap[T]) put(k unique.Handle[string], v **T) (**T, bool) {
4444
m := (*sync.Map)(s)
4545
w := weak.Make(*v)
4646

@@ -65,8 +65,8 @@ reload:
6565
}
6666

6767
var (
68-
interns = &strmap[Gostr]{} // unique.Handle[string] => Gostr
69-
interns2 = &strmap[Gostr2]{} // unique.Handle[string] => Gostr2
68+
interns = &comap[Gostr]{} // unique.Handle[string] => Gostr
69+
interns2 = &comap[Gostr2]{} // unique.Handle[string] => Gostr2
7070

7171
mseed = maphash.MakeSeed()
7272
)

0 commit comments

Comments
 (0)