Beispiel #1
0
func generateID() unsafe.Pointer {
	idmux.Lock()
	defer idmux.Unlock()

	p := C.cgo_id_malloc(C.uint64_t(nextID))
	nextID++
	return unsafe.Pointer(p)
}
Beispiel #2
0
func (s subtypeID) c() unsafe.Pointer {
	return C.cgo_id_malloc(C.uint64_t(s))
}