Example #1
0
func (b *Bitcask) Len() int {
	c_key := C.CString("@")
	defer C.free(unsafe.Pointer(c_key))
	var cnt C.uint
	C.bc_get_hash(b.bc, c_key, &cnt)
	return int(cnt)
}
Example #2
0
func (b *Bitcask) Hash() uint16 {
	c_key := C.CString("@")
	defer C.free(unsafe.Pointer(c_key))
	return uint16(C.bc_get_hash(b.bc, c_key, (*C.uint)(nil)))
}