Added meta data, attributes, to C structure members.
This commit is contained in:
parent
ecb382c0c3
commit
6cb2888281
@ -5,6 +5,7 @@ macro_rules! c_struct
|
|||||||
{
|
{
|
||||||
$cname: ident
|
$cname: ident
|
||||||
{
|
{
|
||||||
|
$(#[$attr: meta])*
|
||||||
$($name: ident: $type: ty);*;
|
$($name: ident: $type: ty);*;
|
||||||
}
|
}
|
||||||
} =>
|
} =>
|
||||||
@ -12,6 +13,7 @@ macro_rules! c_struct
|
|||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct $cname
|
pub struct $cname
|
||||||
{
|
{
|
||||||
|
$(#[$attr])*
|
||||||
$(pub $name: $type),+,
|
$(pub $name: $type),+,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user