Merge pull request #10 from jcreekmore/bug-fixes
Remove the read_u8!() macro
This commit is contained in:
commit
66c5d77a46
13
src/utils.rs
13
src/utils.rs
@ -1,16 +1,3 @@
|
||||
#[macro_export]
|
||||
macro_rules! read_u8 {
|
||||
($elf:ident, $io:ident) => ({
|
||||
use byteorder::{LittleEndian, BigEndian, ReadBytesExt};
|
||||
match $elf.ehdr.data {
|
||||
types::ELFDATA2LSB => { $io.read_u8::<LittleEndian>() }
|
||||
types::ELFDATA2MSB => { $io.read_u8::<BigEndian>() }
|
||||
types::ELFDATANONE => { panic!("Unable to resolve file endianness"); }
|
||||
_ => { panic!("Unable to resolve file endianness"); }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! read_u16 {
|
||||
($elf:ident, $io:ident) => ({
|
||||
|
Loading…
x
Reference in New Issue
Block a user