diff options
author | Adrian Taylor <adrian@macrobug.com> | 2021-01-23 10:20:32 -0800 |
---|---|---|
committer | Adrian Taylor <adrian@macrobug.com> | 2021-01-23 11:34:13 -0800 |
commit | 38ae2288343725899c936dd06d5d4e147d80e8b1 (patch) | |
tree | f50b2b76d59641ff25aec5f137ec8d79e5b00eef /syntax/pod.rs | |
parent | 2029c873c2733846e47516d540ae9ff525e0abfe (diff) | |
download | cxx-38ae2288343725899c936dd06d5d4e147d80e8b1.tar.gz |
Support raw pointers in cxx::bridge.
This allows raw pointers to types to be passed into and out of
cxx::bridge extern "C++" APIs. As normal with raw pointers in Rust,
there are no safety or lifetime guarantees.
Passing a raw pointer into such an API requires that the
function be marked "unsafe".
Diffstat (limited to 'syntax/pod.rs')
-rw-r--r-- | syntax/pod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/syntax/pod.rs b/syntax/pod.rs index e1c48313..0bf152ee 100644 --- a/syntax/pod.rs +++ b/syntax/pod.rs @@ -29,7 +29,7 @@ impl<'a> Types<'a> { | Type::WeakPtr(_) | Type::CxxVector(_) | Type::Void(_) => false, - Type::Ref(_) | Type::Str(_) | Type::Fn(_) | Type::SliceRef(_) => true, + Type::Ref(_) | Type::Str(_) | Type::Fn(_) | Type::SliceRef(_) | Type::Ptr(_) => true, Type::Array(array) => self.is_guaranteed_pod(&array.inner), } } |