Skip to content

Commit 07f1d4b

Browse files
committed
add context
1 parent 187bd49 commit 07f1d4b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ffi/src/scan.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,11 @@ pub struct Stats {
278278
/// Contains information that can be used to get a selection vector. If `has_vector` is false, that
279279
/// indicates there is no selection vector to consider. It is always possible to get a vector out of
280280
/// a `DvInfo`, but if `has_vector` is false it will just be an empty vector (indicating all
281-
/// selected).
281+
/// selected). Without this there's no way for a connector using ffi to know if a &DvInfo actually
282+
/// has a vector in it. We have has_vector() on the rust side, but this isn't exposed via ffi. So
283+
/// this just wraps the &DvInfo in another struct which includes a boolean that says if there is a
284+
/// dv to consider or not. This allows engines to ignore dv info if there isn't any without needing
285+
/// to make another ffi call at all.
282286
#[repr(C)]
283287
pub struct CDvInfo<'a> {
284288
info: &'a DvInfo,

0 commit comments

Comments
 (0)