Fix return of manually written native implements functions
@@ -21,10 +21,10 @@ pub extern "C" fn printf_1(term: Term) -> Term {
}
#[export_name = "io:put_chars/1"]
-pub extern "C" fn put_chars_1(s: *const libc::c_char) -> Option<Term> {
+pub extern "C" fn put_chars_1(s: *const libc::c_char) -> Term {
let sref = unsafe { CStr::from_ptr(s).to_string_lossy() };
println!("{}", &sref);
- Some(ok!())
+ ok!()
}
#[export_name = "io:format/2"]
@@ -32,12 +32,12 @@ pub extern "C" fn format_2(
_s: *const libc::c_char,
_argv: *const Term,
_argc: libc::c_uint,
-) -> Option<Term> {
+) -> Term {
unimplemented!();
}
#[export_name = "io:nl/0"]
-pub extern "C" fn nl_0() -> Option<Term> {
+pub extern "C" fn nl_0() -> Term {
println!();
- Some(ok!())
+ ok!()
}
