Example #1
0
func (h *Handle) Release() error {
	if er := C.alpm_release(h.ptr); er != 0 {
		return Error(er)
	}
	h.ptr = nil
	return nil
}
Example #2
0
func (hand *Handle) Release() error {
	err := C.alpm_release(hand.ptr)

	if err != 0 {
		// XXX I didn't actually test whether alpm_errno actually returns a
		//relevant error when alpm_release fails...
		return hand.Error()
	}

	hand.ptr = nil
	return nil
}