Allowing attributes to be defined on the outter portion of a c_struct.

This commit is contained in:
Myrddin Dundragon 2019-06-25 03:42:56 -04:00
parent 0f48c759bb
commit 51a8a23a65

View File

@ -3,12 +3,14 @@
macro_rules! c_struct macro_rules! c_struct
{ {
{ {
$(#[$sattr: meta])*
$cname: ident $cname: ident
{ {
$($(#[$attr: meta])* $name: ident: $type: ty);*; $($(#[$attr: meta])* $name: ident: $type: ty);*;
} }
} => } =>
{ {
$(#[$sattr])*
#[repr(C)] #[repr(C)]
pub struct $cname pub struct $cname
{ {