Merge pull request #10 from jcreekmore/bug-fixes

Remove the read_u8!() macro
This commit is contained in:
Christopher Cole 2016-04-06 13:43:12 -07:00
commit 66c5d77a46

View File

@ -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) => ({