From 51a8a23a65e5c31355dcd6ab353f30b32489b74a Mon Sep 17 00:00:00 2001 From: Jason Travis Smith Date: Tue, 25 Jun 2019 03:42:56 -0400 Subject: [PATCH] Allowing attributes to be defined on the outter portion of a c_struct. --- src/c_struct.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/c_struct.rs b/src/c_struct.rs index e812e75..9fa5e7d 100644 --- a/src/c_struct.rs +++ b/src/c_struct.rs @@ -3,12 +3,14 @@ macro_rules! c_struct { { + $(#[$sattr: meta])* $cname: ident { $($(#[$attr: meta])* $name: ident: $type: ty);*; } } => { + $(#[$sattr])* #[repr(C)] pub struct $cname {