Skip to content

Commit dfdb158

Browse files
author
Ellen Arteca
committed
olis comments
1 parent ce6df9d commit dfdb158

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/eval.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ pub struct MiriConfig {
130130
/// Whether Stacked Borrows retagging should recurse into fields of datatypes.
131131
pub retag_fields: bool,
132132
/// The location of a shared object file to load when calling external functions
133-
/// TODO! consider allowing users to specify paths to multiple SO files, or to a directory
133+
/// FIXME! consider allowing users to specify paths to multiple SO files, or to a directory
134134
pub external_so_file: Option<PathBuf>,
135135
}
136136

src/shims/ffi_support.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
149149
},
150150
_ => {}
151151
}
152-
// TODO ellen! deal with all the other return types
152+
// FIXME ellen! deal with all the other return types
153153
throw_unsup_format!("unsupported return type to external C function: {:?}", link_name);
154154
}
155155
}
@@ -245,6 +245,10 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
245245

246246
#[derive(Debug, Clone)]
247247
/// Enum of supported arguments to external C functions.
248+
// We introduce this enum instead of just calling `ffi::arg` and storing a list
249+
// of `libffi::high::Arg` directly, because the `libffi::high::Arg` just wraps a reference
250+
// to the value it represents: https://docs.rs/libffi/latest/libffi/high/call/struct.Arg.html
251+
// and we need to store a copy of the value, and pass a reference to this copy to C instead.
248252
pub enum CArg {
249253
/// 8-bit signed integer.
250254
Int8(i8),

0 commit comments

Comments
 (0)