summaryrefslogtreecommitdiffstats
path: root/ffi-macros
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-04-10 14:07:57 +0200
committerJustus Winter <justus@sequoia-pgp.org>2019-04-26 16:55:42 +0200
commit9ef0680c4e9d83c5c3c0945a51859a99bf17dd20 (patch)
tree3702d95860d048c11eaf27e8d4ef6f2e65afeaae /ffi-macros
parenta1e226f8f1418de43e577fdaa1d087b68bbb09ae (diff)
ffi-macros: Fix the RefRaw trait.
- Do not hardcode the lifetime in the trait.
Diffstat (limited to 'ffi-macros')
-rw-r--r--ffi-macros/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffi-macros/src/lib.rs b/ffi-macros/src/lib.rs
index 112577c6..a3ddcce3 100644
--- a/ffi-macros/src/lib.rs
+++ b/ffi-macros/src/lib.rs
@@ -413,7 +413,7 @@ fn derive_conversion_functions(mut st: syn::ItemStruct,
}
}
- impl ::RefRaw<#wrapped> for *const #wrapper {
+ impl ::RefRaw<&'static #wrapped> for *const #wrapper {
fn ref_raw(self) -> &'static #wrapped {
if self.is_null() {
panic!("FFI contract violation: Parameter is NULL");