Skip to content

Commit

Permalink
Add support for union (getditto#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
DBLouis committed May 11, 2021
1 parent 729bf8a commit 2d52b08
Show file tree
Hide file tree
Showing 3 changed files with 378 additions and 19 deletions.
5 changes: 5 additions & 0 deletions src/layout/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,11 @@ impl_ReprC_for! { unsafe {
=> |ref byte: Bool| (byte.0 & !0b1) == 0
,

@for[T : ReprC]
mem::ManuallyDrop<T>
=> |ref _it: T::CLayout| true
,

This comment has been minimized.

Copy link
@danielhenrymantilla

danielhenrymantilla May 11, 2021

Good idea

@for[T : ReprC]
ptr::NonNull<T>
=> |ref it: *mut T::CLayout| {
Expand Down
Loading

2 comments on commit 2d52b08

@danielhenrymantilla
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DBLouis LGTM ✅

@DBLouis
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for helping :)

Please sign in to comment.