From 6cb28882811fc77163acb286ff399d51f0d5d01c Mon Sep 17 00:00:00 2001 From: Jason Travis Smith Date: Tue, 25 Jun 2019 03:14:38 -0400 Subject: [PATCH] Added meta data, attributes, to C structure members. --- src/c_struct.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/c_struct.rs b/src/c_struct.rs index c4496b6..736a213 100644 --- a/src/c_struct.rs +++ b/src/c_struct.rs @@ -5,6 +5,7 @@ macro_rules! c_struct { $cname: ident { + $(#[$attr: meta])* $($name: ident: $type: ty);*; } } => @@ -12,6 +13,7 @@ macro_rules! c_struct #[repr(C)] pub struct $cname { + $(#[$attr])* $(pub $name: $type),+, } };