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 }
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 }