Skip to content

Commit

Permalink
Remove #[repr(packed)], fix #29
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Jun 29, 2017
1 parent d9ff7db commit f9c672f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion capi/include/tendril.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void tendril_debug_dump(const tendril *t, FILE *stream);
//// implementation details follow
////

__attribute__((packed)) struct tendril_impl {
struct tendril_impl {
uintptr_t __ptr;
uint32_t __a;
uint32_t __b;
Expand Down
1 change: 0 additions & 1 deletion src/buf32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ pub const MAX_LEN: usize = u32::MAX as usize;

/// A buffer points to a header of type `H`, which is followed by `MIN_CAP` or more
/// bytes of storage.
#[repr(packed)]
pub struct Buf32<H> {
pub ptr: *mut H,
pub len: u32,
Expand Down
2 changes: 1 addition & 1 deletion src/tendril.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ pub enum SubtendrilError {
///
/// The maximum length of a `Tendril` is 4 GB. The library will panic if
/// you attempt to go over the limit.
#[repr(packed)]
#[repr(C)]
pub struct Tendril<F, A = NonAtomic>
where F: fmt::Format,
A: Atomicity,
Expand Down

0 comments on commit f9c672f

Please sign in to comment.