Use native endian for testing

Add changelog
next
Sayan Nandan 3 years ago
parent 87f260d6b2
commit 6800b5eb0a
No known key found for this signature in database
GPG Key ID: 18E77EBDCADD5AD6

@ -2,6 +2,12 @@
All changes in this project will be noted in this file.
## Unreleased
### Additions
- Added support for system native endian storage (backward compatible)
## Version 0.7.2
### Additions

@ -44,7 +44,7 @@ const SIZE_128BIT: usize = SIZE_64BIT * 2;
/// This contains the fn ptr to decode bytes wrt to the host's endian. For example, if you're on an LE machine and
/// you're reading data from a BE machine, then simply set the endian to big. This only affects the first read and not
/// subsequent ones (unless you switch between machines of different endian, obviously)
static mut NATIVE_ENDIAN_READER: unsafe fn(*const u8) -> usize = super::de::transmute_len_le;
static mut NATIVE_ENDIAN_READER: unsafe fn(*const u8) -> usize = super::de::transmute_len;
/// Use this to set the current endian to LE.
///

@ -479,8 +479,6 @@ mod de {
Some(list)
}
#[cfg(test)]
#[cfg(target_pointer_width = "32")]
pub(super) unsafe fn transmute_len(start_ptr: *const u8) -> usize {
little_endian! {{
return self::transmute_len_le(start_ptr);

Loading…
Cancel
Save