-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
611473f
commit fb6b8f4
Showing
5 changed files
with
134 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
//! A little macro for easy implementation of cxx::ExternType | ||
/// This tells the c++ interop what the native c++ names are | ||
/// from https://docs.rs/cxx/latest/src/cxx/extern_type.rs.html | ||
#[macro_export] | ||
macro_rules! impl_extern_type { | ||
($([$kind:ident] $($(#[$($attr:tt)*])* $ty:path = $cxxpath:literal)*)*) => { | ||
$($( | ||
$(#[$($attr)*])* | ||
unsafe impl cxx::ExternType for $ty { | ||
#[allow(unused_attributes)] // incorrect lint; this doc(hidden) attr *is* respected by rustdoc | ||
#[doc(hidden)] | ||
type Id = cxx::type_id!($cxxpath); | ||
type Kind = cxx::kind::$kind; | ||
} | ||
)*)* | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters