From: Skgland Date: Mon, 25 Aug 2025 22:10:55 +0000 (+0200) Subject: fix left over todo X-Git-Tag: v0.10.0~11^2~2 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=252361fc20b9e01ff5c92f2df29f345bba11cd12;p=scryer-prolog.git fix left over todo --- diff --git a/src/machine/machine_errors.rs b/src/machine/machine_errors.rs index 1c28783c..d43a8cfa 100644 --- a/src/machine/machine_errors.rs +++ b/src/machine/machine_errors.rs @@ -706,7 +706,10 @@ impl MachineState { DomainErrorType::FfiArgumentType, atom_as_cell!(atom!("void")), ), - FfiError::CStrFieldType => todo!(), + FfiError::CStrFieldType => self.domain_error( + DomainErrorType::NonCStrFfiArgumentType, + atom_as_cell!(atom!("cstr")), + ), FfiError::NullPtr => self.domain_error( DomainErrorType::NonNullPtr, fixnum_as_cell!(Fixnum::build_with(0)), @@ -900,6 +903,7 @@ pub(crate) enum DomainErrorType { FfiArgument, FfiArgumentType, FixedSizedInt, + NonCStrFfiArgumentType, } impl DomainErrorType { @@ -923,6 +927,7 @@ impl DomainErrorType { DomainErrorType::FfiArgument => atom!("ffi_argument"), DomainErrorType::FfiArgumentType => atom!("ffi_argument_type"), DomainErrorType::FixedSizedInt => atom!("fixed_sized_int"), + DomainErrorType::NonCStrFfiArgumentType => atom!("non_cstr_ffi_argument_type"), } } }