pub unsafe extern "C" fn hs_clone_scratch(
    src: *const hs_scratch_t,
    dest: *mut *mut hs_scratch_t
) -> hs_error_t
Expand description

Allocate a scratch space that is a clone of an existing scratch space.

This is useful when multiple concurrent threads will be using the same set of compiled databases, and another scratch space is required. Any allocator callback set by @ref hs_set_scratch_allocator() or @ref hs_set_allocator() will be used by this function.

@param src The existing @ref hs_scratch_t to be cloned.

@param dest A pointer to the new scratch space will be returned here.

@return @ref HS_SUCCESS on success; @ref HS_NOMEM if the allocation fails. Other errors may be returned if invalid parameters are specified.