Replaces the free-standing functions in f32, &c.
The free-standing functions in f32, f64, i8, i16, i32, i64, u8, u16, u32, u64, float, int, and uint are replaced with generic functions in num instead. If you were previously using any of those functions, just replace them with the corresponding function with the same name in num. Note: If you were using a function that corresponds to an operator, use the operator instead.
This commit is contained in:
@@ -1919,7 +1919,7 @@ pub mod raw {
|
||||
/// Operations on `[u8]`
|
||||
pub mod bytes {
|
||||
use libc;
|
||||
use uint;
|
||||
use num;
|
||||
use vec::raw;
|
||||
use vec;
|
||||
use ptr;
|
||||
@@ -1943,7 +1943,7 @@ pub mod bytes {
|
||||
pub fn memcmp(a: &~[u8], b: &~[u8]) -> int {
|
||||
let a_len = a.len();
|
||||
let b_len = b.len();
|
||||
let n = uint::min(a_len, b_len) as libc::size_t;
|
||||
let n = num::min(a_len, b_len) as libc::size_t;
|
||||
let r = unsafe {
|
||||
libc::memcmp(raw::to_ptr(*a) as *libc::c_void,
|
||||
raw::to_ptr(*b) as *libc::c_void, n) as int
|
||||
|
||||
Reference in New Issue
Block a user