Skip to content

Commit 3c14772

Browse files
committed
fix: Use validate_pointer_is_not_null in C submodule
1 parent a72b3b5 commit 3c14772

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/c.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use std::ffi::CStr;
88
use std::os::raw::c_char;
99

10-
use super::null_error_check;
10+
use super::validate_pointer_is_not_null;
1111

1212
use crate::error::PointerError;
1313

@@ -25,7 +25,7 @@ use crate::error::PointerError;
2525
pub unsafe fn ref_str<'a>(string: *const c_char) -> Result<&'a str, PointerError> {
2626
// ATTENTION! 'a lifetime is required, does NOT REMOVE it
2727
// see commit 5a03be91d2da8909986db7c54650f3a7863a91ff fixing 3a1d15f33e8e418ef6bee2b7b9e096780bd2c8ac
28-
null_error_check(string)?;
28+
validate_pointer_is_not_null(string)?;
2929
// CAUTION: this is unsafe
3030
let string = CStr::from_ptr(string);
3131
return Ok(string.to_str()?);

0 commit comments

Comments
 (0)