示例#1
0
文件: id.go 项目: jimmyfrasche/cairo
func generateID() unsafe.Pointer {
	idmux.Lock()
	defer idmux.Unlock()

	p := C.cgo_id_malloc(C.uint64_t(nextID))
	nextID++
	return unsafe.Pointer(p)
}
示例#2
0
文件: id.go 项目: jimmyfrasche/cairo
func (s subtypeID) c() unsafe.Pointer {
	return C.cgo_id_malloc(C.uint64_t(s))
}