.
This commit is contained in:
@@ -84,3 +84,7 @@ mod pointer_iterator {
|
||||
pub fn iterate<T: pointer_iterator::Pointer>(pointer: T) -> T::IterType {
|
||||
pointer.into_iter()
|
||||
}
|
||||
|
||||
pub fn fill_with<T, F: FnMut(usize) -> T>(slice: &mut [T], mut func: F) {
|
||||
slice.iter_mut().enumerate().for_each(|(i,v)|*v = func(i))
|
||||
}
|
||||
@@ -32,7 +32,6 @@ pub mod win32;
|
||||
#[cfg(feature = "win32")]
|
||||
pub use win32::{ image_base, image_header, find_kernel32, process_executable };
|
||||
|
||||
|
||||
/// re-export the signature macro
|
||||
pub use xgen::signature;
|
||||
|
||||
|
||||
@@ -50,9 +50,13 @@ gen_upcast!(i16 => isize);
|
||||
|
||||
#[cfg(any(target_pointer_width = "64", target_pointer_width = "32"))]
|
||||
gen_upcast!(u32 => usize);
|
||||
#[cfg(any(target_pointer_width = "64"))]
|
||||
gen_upcast!(u64 => usize);
|
||||
|
||||
#[cfg(any(target_pointer_width = "64", target_pointer_width = "32"))]
|
||||
gen_upcast!(i32 => isize);
|
||||
#[cfg(any(target_pointer_width = "64"))]
|
||||
gen_upcast!(i64 => isize);
|
||||
|
||||
gen_upcast!(isize => isize);
|
||||
gen_upcast!(usize => usize);
|
||||
|
||||
Reference in New Issue
Block a user