Beispiel #1
0
func hsReallocScratch(db hsDatabase, scratch *hsScratch) error {
	if ret := C.hs_alloc_scratch(db, (**C.struct_hs_scratch)(scratch)); ret != C.HS_SUCCESS {
		return HsError(ret)
	}

	return nil
}
Beispiel #2
0
func hsAllocScratch(db hsDatabase) (hsScratch, error) {
	var scratch *C.hs_scratch_t

	if ret := C.hs_alloc_scratch(db, &scratch); ret != C.HS_SUCCESS {
		return nil, HsError(ret)
	}

	return scratch, nil
}