Allowing attributes to be defined on the outter portion of a c_struct.
This commit is contained in:
parent
0f48c759bb
commit
51a8a23a65
@ -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
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user