+24
-18
@@ -2,6 +2,8 @@
|
||||
//!
|
||||
//! See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/inttypes.h.html>.
|
||||
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
|
||||
use crate::{
|
||||
header::{ctype, errno::*, stdlib::*},
|
||||
platform::{self, types::*},
|
||||
@@ -36,15 +38,17 @@ pub unsafe extern "C" fn strtoimax(
|
||||
endptr: *mut *mut c_char,
|
||||
base: c_int,
|
||||
) -> intmax_t {
|
||||
strto_impl!(
|
||||
intmax_t,
|
||||
false,
|
||||
intmax_t::max_value(),
|
||||
intmax_t::min_value(),
|
||||
s,
|
||||
endptr,
|
||||
base
|
||||
)
|
||||
unsafe {
|
||||
strto_impl!(
|
||||
intmax_t,
|
||||
false,
|
||||
intmax_t::max_value(),
|
||||
intmax_t::min_value(),
|
||||
s,
|
||||
endptr,
|
||||
base
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/strtoimax.html>.
|
||||
@@ -54,15 +58,17 @@ pub unsafe extern "C" fn strtoumax(
|
||||
endptr: *mut *mut c_char,
|
||||
base: c_int,
|
||||
) -> uintmax_t {
|
||||
strto_impl!(
|
||||
uintmax_t,
|
||||
false,
|
||||
uintmax_t::max_value(),
|
||||
uintmax_t::min_value(),
|
||||
s,
|
||||
endptr,
|
||||
base
|
||||
)
|
||||
unsafe {
|
||||
strto_impl!(
|
||||
uintmax_t,
|
||||
false,
|
||||
uintmax_t::max_value(),
|
||||
uintmax_t::min_value(),
|
||||
s,
|
||||
endptr,
|
||||
base
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// wcstoimax(), wcstoumax() currently defined in header::wchar?
|
||||
|
||||
Reference in New Issue
Block a user