github.com/sitano/gsysint@v0.0.0-20190607084937-69a4f3233e4e/g/alg.go (about)

     1  // Copyright 2014 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package g
     6  
     7  import (
     8  	"unsafe"
     9  )
    10  
    11  // TypeAlg is also copied/used in reflect/type.go.
    12  // keep them in sync.
    13  type TypeAlg struct {
    14  	// function for hashing objects of this type
    15  	// (ptr to object, seed) -> Hash
    16  	Hash func(unsafe.Pointer, uintptr) uintptr
    17  	// function for comparing objects of this type
    18  	// (ptr to object A, ptr to object B) -> ==?
    19  	Equal func(unsafe.Pointer, unsafe.Pointer) bool
    20  }
    21